Plush

Decal#

PlushEngine · Type index

Namespace: PlushEngine

A decal: the object's Material projected onto the surfaces inside its box (metres; Box: centred on the object; Corner: from the crease, SizeY up and SizeZ out). The material's base colour map (its alpha is the coverage) tints when Color is on; its normal map bends the surface when Normals is on. Roughness and Metallic independently replace those surface values; null inherits the legacy Surface switch. Emission blends the material's linear HDR emission over the receiver's emission before tonemapping; disabled by default. It does not create a light or rebake probes. Disabled channels preserve the receiver and earlier decals. Coverage and Opacity apply to every enabled channel, even with colour disabled. Surfaces turned more than AngleFade degrees from the projection are skipped so a wall decal does not smear along the floor. Where decals overlap the higher Priority draws on top.

[method: System.Text.Json.Serialization.JsonConstructor]
public sealed record Decal(float SizeX = 1f, float SizeY = 1f, float SizeZ = .5f, DecalMode Mode = DecalMode.Box, float Opacity = 1f, float AngleFade = 60f, int Priority = 0, bool Normals = true, bool Surface = true, bool Color = true, bool? Roughness = null, bool? Metallic = null, bool Emission = false)

Record properties#

PropertyTypeAccessConstructor default
SizeXfloatget; init;1f
SizeYfloatget; init;1f
SizeZfloatget; init;.5f
ModeDecalModeget; init;DecalMode.Box
Opacityfloatget; init;1f
AngleFadefloatget; init;60f
Priorityintget; init;0
Normalsboolget; init;true
Surfaceboolget; init;true
Colorboolget; init;true
Roughnessbool?get; init;null
Metallicbool?get; init;null
Emissionboolget; init;false

Members: AffectsMetallic · AffectsRoughness · Decal · Deconstruct

AffectsMetallic#

[System.Text.Json.Serialization.JsonIgnore]
public bool AffectsMetallic { get; }

Whether this decal writes metallic, including the legacy Surface fallback.

AffectsRoughness#

[System.Text.Json.Serialization.JsonIgnore]
public bool AffectsRoughness { get; }

Whether this decal writes roughness, including the legacy Surface fallback.

Decal#

public Decal(float sizeX, float sizeY, float sizeZ, DecalMode mode, float opacity, float angleFade, int priority, bool normals, bool surface);

Keeps the original constructor available to previously compiled gameplay Scripts.

Deconstruct#

public void Deconstruct(out float sizeX, out float sizeY, out float sizeZ, out DecalMode mode, out float opacity, out float angleFade, out int priority, out bool normals, out bool surface);

Keeps the original positional deconstruction available to previously compiled Scripts.

DecalMode

Source#