THREE.JS / FOUNDATIONS 109
A shadow can carry color.
Compare a depth-only caster, a colored castShadowNode, and a
transmissive physical material. The renderer decides whether the shadow map
keeps that material payload.
Initializing
-
Preparing one directional shadow map and three caster contracts.
- Shadow map
- -
- Shadow payload
- -
- Hook paths
- -
- Transmission
- -
- Compile ms
- -
- Draw calls
- -
- Frame ms
- -
- Resolution
- -
Shadow payload-
The colored and glass lanes write RGB/alpha shadow payloads; the native lane remains depth-only.
Three shadow contractssame light, different payloads
native
default ShadowNode / opaque depthcolored
castShadowNode = vec4(1, .16, .08, 1)transmitted
MeshPhysicalNodeMaterial + transmissionNoderenderer
shadowMap.transmitted = true
Transmitted shadow study unavailable.
The depth-only option intentionally removes the custom cast hook before compiling. Try ?forceWebGL=1 to compare the WebGL2 backend through the same WebGPU renderer API.
LAB 109 / TRANSMITTED SHADOW