Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Module rendering/environment/baked

    A baked environment map (environment/faces-<digest> in the store) as a three CubeTexture.

    The store carries the RAW capture — six faces of IEEE half-float bits, RGBA, in three's px, nx, py, ny, pz, nz order — and three prefilters (PMREM) it at load, on either backend, the moment it is assigned to scene.environment. Storing the raw faces rather than a prefiltered map keeps the prefilter math three's and the file small (a 128 px cube is ~0.8 MB of halves before zstd).

    Orientation: the faces are read back from the capture target in GL memory order (bottom-up rows — readPixelsCompactAsync(..., { flipY: true })) and uploaded here with flipY = false, so every texel lands where the render target had it. The header's coordinate_system records which backend captured them; three's CubeCamera compensates for the backends' differing framebuffer conventions with per-backend face orientations precisely so the RESULTING cube map is the same conventional cube map, which is what lets a map baked on one backend load on the other.

    buildBakedCubeTexture