Documentation
    Preparing search index...

    Variable MAX_PUNCTUAL_LIGHTSConst

    MAX_PUNCTUAL_LIGHTS: 8

    How many of §68's positional lights — point and spot together — one frame may shade with (R-17, 2026-08-09).

    §68 states no number, and Appendix A pins no light defaults, so this is a recorded decision rather than a quotation. Eight, because:

    • it is a forward renderer's bound, and the honest ceiling on one is what the fragment stage can afford to loop over per pixel. §68's own answer to "many lights" is the clustered/forward-plus extension path, which is where a scene with dozens of lamps belongs — not a larger array;
    • the four arrays cost 8 × (3 + 3 + 3 + 4) = 104 floats, i.e. 32 uniform vectors. GLES 3.0 guarantees 224 fragment uniform vectors, and this backend's largest pipeline (§59's standard program) spends about 17 on everything else — so eight lights fit inside the guaranteed minimum with room to spare on every conformant WebGL 2 device, with no capability query and no shader variant;
    • it is the number three of the four engines this project's positioning document compares against settle on for a forward path, so an author porting a scene meets no surprise.

    It is a compile-time constant of the shader, not a runtime option, which is the point: a maxLights option would mean recompiling pipelines at run time and a §61 renderer may not throw inside a frame.