Header menu logo Mibo

ShadowResult Type

The shadow pass output for a frame: the atlas texture + the packed shadow-sampling uniforms a shader consumes. ShadowResult.Atlas is the depth atlas; the arrays are sized to the active caster count.

Built by the pipeline's shadow pass; ValueNone when no shadow-casting light exists. A custom/user effect opts into shadows by declaring these uniforms (by name) — see SceneUpload.uploadToEffect.

Record fields

Record Field Description

ActiveCasterCount

Full Usage: ActiveCasterCount

Field type: int

The number of active caster regions (the live length of the packed arrays).

Field type: int

Atlas

Full Usage: Atlas

Field type: Texture2D

The shadow depth atlas. Bound to sampler slot 15 (PointClamp) by SceneUpload.

Field type: Texture2D

Biases

Full Usage: Biases

Field type: float32[]

The per-caster receiver-side bias (shadowBiases[]), preventing self-shadow acne when a surface both casts and receives (e.g. the instanced floor).

Field type: float32[]

DirLightCastsShadows

Full Usage: DirLightCastsShadows

Field type: bool

Whether the directional light casts shadows (the dirLightCastsShadows flag).

Field type: bool

PointLightShadowIdx

Full Usage: PointLightShadowIdx

Field type: int[]

The per-point-light shadow atlas slot (-1 = no shadow), indexed by PointLights position.

Field type: int[]

SpotLightShadowIdx

Full Usage: SpotLightShadowIdx

Field type: int[]

The per-spot-light shadow atlas slot (-1 = no shadow), indexed by SpotLights position.

Field type: int[]

TexelSize

Full Usage: TexelSize

Field type: float32

1.0f / atlasResolution — for the shadowTexelSize PCF spread.

Field type: float32

UVOffsets

Full Usage: UVOffsets

Field type: Vector4[]

The packed shadowUVOffsets[] (atlas-region UV scale/offset per caster).

Field type: Vector4[]

ViewProjs

Full Usage: ViewProjs

Field type: Matrix4x4[]

The packed shadowViewProjs[] (one per active caster region).

Field type: Matrix4x4[]

Type something to start searching.