Documentation
    Preparing search index...

    Function writeLightUniforms

    • Packs one view's LightUniforms block into staging at floatBase.

      Every float of the block is written — the unused w slots and the dead tail of the arrays included — so the uploaded bytes are a function of this frame's SceneLights alone, never of what a previous frame or view left in the reused staging array (clearSceneLights' transcript-determinism argument, restated one buffer later).

      The three vec3-meaning arrays are re-strided from SceneLights' packed three-floats-per-light to the block's vec4 slots; punctualParams copies straight through. SceneLights zeroes its own dead tails per collection, so the re-stride can copy all MAX_PUNCTUAL_LIGHTS entries without consulting the count.

      The eye is three scalars rather than a Vector3 for setCameraPosition's recorded reason: the renderer reads them straight out of the camera's world matrix translation column and has nothing to allocate on the way.

      Branch-free on purpose: point-versus-spot is already resolved in the packed SceneLights arrays (writePunctualLight), and a packer that re-decided it would be a second place for the light model to drift.

      Parameters

      • staging: Float32Array
      • floatBase: number
      • lights: SceneLights
      • cameraX: number
      • cameraY: number
      • cameraZ: number

      Returns void