THREE.JS / FOUNDATIONS 108
Shadow policy is part of the material.
LightsNode chooses which lights illuminate a material. NodeMaterial shadow hooks separately decide how geometry casts, receives, and samples those shadows.
Initializing
-
Preparing two shadow maps and three material contracts.
- Light policy
- -
- Receiver
- -
- Caster
- -
- Shadow maps
- -
- Compile ms
- -
- Cache keys
- -
- Draw calls
- -
- Frame ms
- -
Shadow contract-
Left consumes red light, center consumes both lights, and right consumes blue light.
NodeMaterial shadow hooksorthogonal policies
lightsNode
red / all / blue listsmaskShadowNode
blocker material can discardreceivedShadowNode
default ShadowNode outputreceivedShadowPositionNode
positionWorldred
-all
-blue
-
Shadow contract study unavailable.
Receiver and caster policies use live TSL uniforms; changing the light list, shadow state, or sample position rebuilds the render contract. Try ?forceWebGL=1 for the GLSL backend.
LAB 108 / SHADOW CONTRACT