Documentation
    Preparing search index...

    Class ShadowProgram

    The depth-only caster pipeline (§69).

    const program = ShadowProgram.create(gl);
    program.use();
    program.setViewProjection(lights.shadowMatrix); // once per shadow pass
    program.setModel(item.worldMatrix); // once per caster

    Owns its GL objects and nothing else. Since 2026-09-11 it compiles lazily, on the first frame whose light asks for a shadow map, and only once registerShadowPipeline has been called — the renderer drops it on context loss and re-acquires it on the next shadowed frame (§61), exactly as it handles the skinned pair.

    Implements

    Index
    • get disposed(): boolean

      Whether ShadowProgram.dispose has run.

      Returns boolean

    • Deletes the GL program (§83). Idempotent.

      Only call this on a live context — see UnlitProgram.dispose.

      Returns void

    • Uploads the light's view-projection for the pass — SceneLights.shadowMatrix. Column-major, so transpose is false (§7b).

      Parameters

      Returns void

    • Makes this the current program. Call before any upload below.

      Returns void

    • Compiles and links the shadow program on gl.

      Fails exactly as UnlitProgram.create does — see it for the contract; the messages name "shadow" and the §89 code is the same.

      Parameters

      Returns ShadowProgram