THREE.JS / FOUNDATIONS 135

Own the lighting rule.

Three.js lets a material replace the lighting algorithm itself. Keep the same surface and three point lights, then compare native PBR with a custom LightingModel that adds each light color directly.

Initializing -

Preparing the native and custom lighting contexts.

Material
-
Lighting model
-
Light ownership
-
Active lights
-
Graph builds
-
Draw calls
-
Triangles
-
CPU avg
-
CPU p95
-
Context cache
-
Lighting contractready

Light data and custom gain update without rebuilding; material or context changes wait for rebuild.

Lighting graphphysical
surface nodes->scene lights->PhysicalLightingModel->output

MeshStandardNodeMaterial keeps the renderer-owned scene light list and native PBR model.

The official custom-lighting example subclasses THREE.LightingModel, overrides direct(), and assigns a lights().context() node. Use ?forceWebGL=1 to run the same contract through WebGL2.

Review built-in model composition ->
LAB 135 / CUSTOM LIGHTING MODEL