Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
UpdateMode
ReflectionProbe.swift:22enum UpdateMode
Cases
case once
Update the probe once on the next frame (recommended for most objects). The corresponding radiance map will be generated over the following six frames. This takes more time to update than .updateAlways, but it has a lower performance cost and can result in higher-quality reflections. The ReflectionProbe is updated when its transform changes, but not when nearby geometry changes. You can force a
ReflectionProbe
update by moving theReflectionProbe
slightly in any direction.case always
Update the probe every frame. This provides better results for fast-moving dynamic objects (such as cars). However, it has a significant performance cost. Due to the cost, it’s recommended to only use one ReflectionProbe with .updateAlways at most per scene. For all other use cases, use .updateOnce.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (15) members.
Types
Type members
Instance members
var ambientColor: Color
The custom ambient color to use within the
ReflectionProbe
’s box defined by itssize
. Only effective ifambientMode
is .ambientColor.var ambientColorEnergy: Double
The custom ambient color energy to use within the
ReflectionProbe
’s box defined by itssize
. Only effective ifambientMode
is .ambientColor.var ambientMode: ReflectionProbe.AmbientMode
The ambient color to use within the
ReflectionProbe
’s box defined by itssize
. The ambient color will smoothly blend with otherReflectionProbe
s and the rest of the scene (outside theReflectionProbe
’s box defined by itssize
).var boxProjection: Bool
If
true
, enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera’s location.var cullMask: UInt32
Sets the cull mask which determines what objects are drawn by this probe. Every
VisualInstance3D
with a layer included in this cull mask will be rendered by the probe. To improve performance, it is best to only include large objects which are likely to take up a lot of space in the reflection.var enableShadows: Bool
If
true
, computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the .updateAlwaysupdateMode
.var intensity: Double
Defines the reflection intensity. Intensity modulates the strength of the reflection.
var interior: Bool
If
true
, reflections will ignore sky contribution.var maxDistance: Double
The maximum distance away from the
ReflectionProbe
an object can be before it is culled. Decrease this to improve performance, especially when using the .updateAlwaysupdateMode
.var meshLodThreshold: Double
The automatic LOD bias to use for meshes rendered within the
ReflectionProbe
(this is analog tomeshLodThreshold
). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to0.0
, automatic LOD is disabled. IncreasemeshLodThreshold
to improve performance at the cost of geometry detail, especially when using the .updateAlwaysupdateMode
.var originOffset: Vector3
Sets the origin offset to be used when this
ReflectionProbe
is inboxProjection
mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the number of objects that “get in the way” of the reflection.var size: Vector3
The size of the reflection probe. The larger the size, the more space covered by the probe, which will lower the perceived resolution. It is best to keep the size only as large as you need it.
var updateMode: ReflectionProbe.UpdateMode
Sets how frequently the
ReflectionProbe
is updated. Can be .updateOnce or .updateAlways.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.