Skip to content

@modoki/engine / rendering / getSceneLightUniforms

Function: getSceneLightUniforms()

getSceneLightUniforms(): SceneLightUniforms

The shared singleton uniform nodes, created on first use.

Every one is .setGroup(renderGroup) — these are SCENE-GLOBAL values, and a bare uniform() lands in objectGroup (a per-render-object buffer) which is only re-uploaded when NodeMaterialObserver.needsRefresh(renderObject) is true — false forever for a static mesh. That would make a light change silently never reach a NON-ANIMATING custom-shader object while animated ones updated fine. (Latent here until now only because every shipped custom-shader object happens to animate — space-console's ship shakes and its planet spins, which trips needsRefresh for the unrelated world-matrix reason.) Same root cause as the height-fog staleness; see the uniform-group rule in docs/rendering.md "Fog".

Returns

SceneLightUniforms

Built with Modoki.