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

    The compositing decision, as three material state plus the coordinator's stamp.

    interface PhysicalCompositing {
        transparent: boolean;
        depthWrite: boolean;
        alphaTest: number;
        blendingMode: "opaque" | undefined;
        drawBeforeEmissive: boolean;
        drawAfterEmissive: boolean;
    }
    Index
    transparent: boolean
    depthWrite: boolean
    alphaTest: number
    blendingMode: "opaque" | undefined

    What userData.blendingMode is stamped as. 'opaque' when the surface is opaque, so the depth-sort coordinator releases it and the pick pass applies the same cutout; UNSET when translucent, so the coordinator still releases it (a physical mesh is never triangle-sorted — spec §3.2) and the pick pass takes every fragment, matching what is drawn.

    drawBeforeEmissive: boolean

    Whether the mesh must be drawn BEFORE the emissive data around it. True for glass: on WebGPU a transmissive mesh shares the transparent render list with every point, line and splat layer, and a glass fragment lands with alpha 1, so a cluster whose centre sorts farther than the sphere would be drawn first and then painted over. The depth-sort coordinator reads this off userData.drawBeforeEmissive and orders the mesh first within its layer_order band on both backends (on WebGL it is already in the earlier transmissive list, so the rule is harmless there). Exactly one of this and PhysicalCompositing.drawAfterEmissive is set for glass; neither for anything else.

    drawAfterEmissive: boolean

    The Phase 3 inverse (spec §3.4): glass authored with refract_data must draw AFTER the emissive data so that what it samples already holds the data. The coordinator reads userData.drawAfterEmissive and ranks such a mesh LAST within its layer_order band (that is the whole mechanism on WebGPU); on WebGL the post-processing pipeline additionally splits the scene pass so three's transmission target sees the data.