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

    Module rendering/picking/mesh/pick-mode

    The mesh pick pass's mode-derived state, and the capability the picking system dispatches on.

    A mesh's pick behaviour depends on the visual material's blending mode in two ways (§6.5), and they must never disagree:

    Consequence True for Why
    hard alpha cutout opaque a hole the user sees through must not be pickable, nor depth-occlude picks of what is visible through it
    real projected depth opaque, normal the user sees an occluding surface, so front-most must win rather than brightest

    The two overlap but are not the same set, which is exactly why this module exists: a material given "cutout on, brightness-as-depth" would discard holes correctly and then let a dim mesh in front occlude a brighter node behind it. Deriving both from the mode in ONE place makes that combination unreachable.

    The gsplat pick wrapper's SurfacePickAwareMaterial covers only the depth half — gsplats have no cutout — so mesh needs its own capability rather than widening that one. PickingSystem.renderPickBuffer prefers this interface when present and falls back to setSurfacePickDepth otherwise, reading the mode exactly once either way.

    MeshPickAwareMaterial
    MeshPickModeState
    isMeshPickAwareMaterial
    resolveMeshPickModeState