Enumerationmigueldeicaza.swiftgodot 0.46.0SwiftGodot
DecalTexture
Decal.swift:30enum DecalTexture
Cases
case albedo
Texture2D
corresponding totextureAlbedo
.case normal
Texture2D
corresponding totextureNormal
.case orm
Texture2D
corresponding totextureOrm
.case emission
Texture2D
corresponding totextureEmission
.case max
Max size of
DecalTexture
enum.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (16) members.
Type members
Instance members
var albedoMix: Double
Blends the albedo
Color
of the decal with albedoColor
of the underlying mesh. This can be set to0.0
to create a decal that only affects normal or ORM. In this case, an albedo texture is still required as its alpha channel will determine where the normal and ORM will be overridden. See alsomodulate
.var cullMask: UInt32
Specifies which
layers
this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you can ensure that dynamic objects don’t accidentally receive a Decal intended for the terrain under them.var distanceFadeBegin: Double
The distance from the camera at which the Decal begins to fade away (in 3D units).
var distanceFadeEnabled: Bool
If
true
, decals will smoothly fade away when far from the activeCamera3D
starting atdistanceFadeBegin
. The Decal will fade out overdistanceFadeBegin
+distanceFadeLength
, after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance.var distanceFadeLength: Double
The distance over which the Decal fades (in 3D units). The Decal becomes slowly more transparent over this distance and is completely invisible at the end. Higher values result in a smoother fade-out transition, which is more suited when the camera moves fast.
var emissionEnergy: Double
Energy multiplier for the emission texture. This will make the decal emit light at a higher or lower intensity, independently of the albedo color. See also
modulate
.var lowerFade: Double
Sets the curve over which the decal will fade as the surface gets further from the center of the
AABB
. Only positive values are valid (negative values will be clamped to0.0
). See alsoupperFade
.var modulate: Color
Changes the
Color
of the Decal by multiplying the albedo and emission colors with this value. The alpha component is only taken into account when multiplying the albedo color, not the emission color. See alsoemissionEnergy
andalbedoMix
to change the emission and albedo intensity independently of each other.var normalFade: Double
Fades the Decal if the angle between the Decal’s
AABB
and the target surface becomes too large. A value of0
projects the Decal regardless of angle, a value of1
limits the Decal to surfaces that are nearly perpendicular.var size: Vector3
Sets the size of the
AABB
used by the decal. All dimensions must be set to a value greater than zero (they will be clamped to0.001
if this is not the case). The AABB goes from-size/2
tosize/2
.var textureAlbedo: Texture2D?
Texture2D
with the baseColor
of the Decal. Either this or thetextureEmission
must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object.var textureEmission: Texture2D?
Texture2D
with the emissionColor
of the Decal. Either this or thetextureAlbedo
must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object.var textureNormal: Texture2D?
Texture2D
with the per-pixel normal map for the decal. Use this to add extra detail to decals.var textureOrm: Texture2D?
Texture2D
storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals.var upperFade: Double
Sets the curve over which the decal will fade as the surface gets further from the center of the
AABB
. Only positive values are valid (negative values will be clamped to0.0
). See alsolowerFade
.
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.