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

    Module rendering/picking/gsplat/shaders

    GLSL3 picking shader source for Gaussian splats + ShaderSource record.

    Mirrors the visual gsplat shader with picking-specific adjustments:

    • uNodeId uniform + vNodeId / vElementId varyings, written into the RGBA32F pick buffer as (nodeId, elementId-low16, brightness, elementId-high16).
    • Tighter truncation: 1.5σ (vs the node's own T, default 2.75σ, for the visual) so the pick footprint is the bright core only; the coverage fade still culls with the node's T (uCoverageTruncate).
    • The VISUAL amplitude and weight: the node's projection (the sum-projection ray-integral boost included), per-splat alpha, node opacity and gain (../_shared/visibility-glsl.ts), so a splat is pickable exactly when it is visible.
    • Brightness-as-depth so the brightest overlapping fragment wins — except in surface ('normal') mode (uSurfaceDepth == 1), where the real projected depth is written so the FRONT-MOST splat wins, matching the depth-sorted occluding surface the user sees.

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

    GSPLAT_PICK_VERTEX_SHADER
    GSPLAT_PICK_FRAGMENT_SHADER
    GSPLAT_PICK_SOURCE