Rebuild EVERY material group of a built scene in place so renderables pick up the scene's current
light/shadow topology.
Renderables bake scene-wide state at build time: the per-mesh light INDEX list, the single- vs
multi-light shader permutation, whether a mesh receives shadows, and the shadow bind group of the
generator attached to each light. Light data itself is uploaded every frame, but none of that baked
state follows a light being added, removed, or swapped — this re-runs the group builders so it does.
Called automatically when a scene whose topology changed is registered again, so the usual flow is
unregisterScene → mutate lights → registerScene*. Call it directly to apply a change to a scene
that stays registered.
Only group-owned renderables are replaced: feature-owned entries in scene._renderables (skybox,
ground, HDR backdrop, Gaussian splats) are preserved. Node materials that captured their shadow
generators at parse time keep those references and are out of scope.
Rebuild EVERY material group of a built scene in place so renderables pick up the scene's current light/shadow topology.
Renderables bake scene-wide state at build time: the per-mesh light INDEX list, the single- vs multi-light shader permutation, whether a mesh receives shadows, and the shadow bind group of the generator attached to each light. Light data itself is uploaded every frame, but none of that baked state follows a light being added, removed, or swapped — this re-runs the group builders so it does.
Called automatically when a scene whose topology changed is registered again, so the usual flow is
unregisterScene→ mutate lights →registerScene*. Call it directly to apply a change to a scene that stays registered.Only group-owned renderables are replaced: feature-owned entries in
scene._renderables(skybox, ground, HDR backdrop, Gaussian splats) are preserved. Node materials that captured their shadow generators at parse time keep those references and are out of scope.No-op before the scene's initial build has run.