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

    Module rendering/picking/point/shaders

    GLSL3 picking shader source for points + ShaderSource record.

    Mirrors the visual point shader in rendering/materials/point/shader-glsl.ts with three picking-specific additions:

    • uNodeId uniform + vNodeId / vElementId varyings, written into the RGBA32F pick buffer as (nodeId, elementId-low16, brightness, elementId-high16).
    • 80%-radius truncation so the pick footprint tracks the visible disc while staying slightly biased toward the bright core.
    • Brightness weighted by the visual factors (per-point alpha, node opacity, gain — ../_shared/visibility-glsl.ts), so an invisible point is not pickable.
    • Brightness-as-depth so the brightest overlapping fragment wins the depth test (matters for hover-through-translucent point stacks) — except in the depth-ordered opaque / normal modes (uSurfaceDepth == 1, ../_shared/surface-pick.ts), where the real projected depth is written so the FRONT-MOST point wins.

    Source-of-truth for GLSL3; the WebGPU counterpart lives in ./pick.tsl and is referenced through the ShaderSource.webgpu factory below.

    POINT_PICK_VERTEX_SHADER
    POINT_PICK_FRAGMENT_SHADER
    POINT_PICK_SOURCE