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
lightsNodered / all / blue lists
maskShadowNodeblocker material can discard
receivedShadowNodedefault ShadowNode output
receivedShadowPositionNodepositionWorld
red-
all-
blue-

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.

Related: clustered lights and point-shadow ownership ->
LAB 108 / SHADOW CONTRACT