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

    Module rendering/environment/cube-capture

    The exact scene capture behind viewer_config.environment.source = "scene".

    Six renders of the REAL scene with the REAL shaders from a CubeCamera at the probe, into a half-float cube render target. Nothing is approximated: what a chrome sphere reflects is what the viewer draws, colormaps, intensity, opacity, LOD energy compensation and all (spec §3.3 — the approximate emitter projection was rejected for duplicating that pipeline). Assigning the target's texture to scene.environment is enough on both backends: three re-prefilters (PMREM) in place whenever CubeCamera.update bumps the texture's pmremVersion.

    Two details keep the capture correct:

    • No self-reflection. Physical meshes are hidden for the six draws (their previous visible is restored afterwards, so a user- or LOD-hidden mesh stays hidden). Visibility rather than a layers bit: a persistent bit would need the pick camera and the main camera to agree on it. The only layers use in the viewer — the refraction split (rendering/render-layers.ts) — is transient inside a single render call and is restored before this capture, or anything else, can observe it.
    • Sprite sizes. Point and line footprints come from the camera params the material manager broadcasts (fov, drawing-buffer size, pixel ratio). The caller pushes the cube camera's params before the six renders and restores the main camera's after — see SceneEnvironment.captureScene.
    CubeTargetLike
    CubeCaptureRequest
    isPhysicalMeshObject
    captureClipPlanes
    captureSceneCube