ReflectionProbe QML Type

Defines a reflection probe in the scene. 更多...

import 语句: import QtQuick3D
继承:

Node

特性

方法

详细描述

A reflection probe is used to provide reflections of the current scene to the objects. The probe provides properties to the runtime which are then used to render the scene to a cube map. The cube map is then used as the reflection information for the reflecting objects.

另请参阅 Qt Quick 3D - Reflection Probes Example .

特性文档编制

boxOffset : vector3d

Box offset is used to move the box relative to the reflection probe position. Since the probe captures the environment from its position, this property can be used to move the box around without affecting the position where the probe capture the environment. This property alongside with ReflectionProbe::boxSize will be used to determine the object that fall inside the box. With ReflectionProbe::parallaxCorrection turned on, this property can be used to position the box to get more accurate reflections.

另请参阅 parallaxCorrection .

boxSize : vector3d

Box size is used to determine which objects get their reflections from this ReflectionProbe . Objects that are inside the box are under the influence of this ReflectionProbe . If an object lies inside more than one reflection probe at the same time, the object is considered to be inside the nearest reflection probe. With ReflectionProbe::parallaxCorrection turned on the size is also used to calculate the distance of the reflections in the cube map.

另请参阅 parallaxCorrection .

clearColor : 颜色

Clear color is the color used to clear the cube map prior rendering the scene.

debugView : bool [since 6.4]

If this property is set to true, a wireframe is rendered to visualize the reflection probe box.

该特性在 Qt 6.4 引入。

parallaxCorrection : bool

By default the reflections provided by the reflection probe are assumed to be from an infinite distance similar to the skybox. This works fine for environmental reflections but for tight spaces this causes perspective errors in the reflections. To fix this parallax correction can be turned on. The distance of the reflection is then determined by the ReflectionProbe::boxSize 特性。

另请参阅 boxSize .

quality : enumeration

Quality determines the resolution of the cube map.

Possible values are:

常量 描述
ReflectionProbe.VeryLow Renders a reflection map using a 128x128 texture.
ReflectionProbe.Low Renders a reflection map using a 256x256 texture.
ReflectionProbe.Medium Renders a reflection map using a 512x512 texture.
ReflectionProbe.High Renders a reflection map using a 1024x1024 texture.
ReflectionProbe.VeryHigh Renders a reflection map using a 2048x2048 texture.

默认值为 ReflectionProbe.Low

refreshMode : enumeration

Refresh mode tells the runtime how often the cube map should be updated.

Possible values are:

常量 描述
ReflectionProbe.FirstFrame Renders the scene on the first frame.
ReflectionProbe.EveryFrame Renders the scene every frame.

默认值为 ReflectionProbe.EveryFrame

注意: 使用 ReflectionProbe.FirstFrame for improved performance.

texture : CubeMapTexture [since 6.5]

Instead of rendering the scene, this cube map texture is used to show reflections in objects affected by this reflection probe.

该特性在 Qt 6.5 引入。

另请参阅 CubeMapTexture .

timeSlicing : enumeration

Time slicing determines how the cube map render is timed.

Possible values are:

常量 描述
ReflectionProbe.None All faces of the cube map are rendered and prefiltered during one frame.
ReflectionProbe.AllFacesAtOnce All faces are rendered during one frame but the prefiltering is divided to subsquent frames with each mip level handled on their own frame. Rough surface reflections are thus refreshed every sixth frame while smooth surfaces have reflections that refresh every frame.
ReflectionProbe.IndividualFaces Each face is rendered and prefiltered in a separate frame. Thus all reflections are refreshed every sixth frame.

默认值为 ReflectionProbe.None

注意: 使用 ReflectionProbe.AllFacesAtOnce or ReflectionProbe.IndividualFaces to increase performance.

方法文档编制

scheduleUpdate ()

Updates the reflection probe render when called while ReflectionProbe::refreshMode is set as ReflectionProbe.FirstFrame .