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

    Module rendering/picking/line/shaders

    GLSL3 picking shader source for lines + ShaderSource record.

    Mirrors the visual line shader's near-plane safety, max-pixel-width clamp, and width/sharpness sanitization so the pick footprint stays in lock-step with the visible footprint. Strips colormap and color varyings (not needed for picking) and adds the uNodeId uniform and vNodeId / vElementId varyings written into the RGBA32F pick buffer as (nodeId, elementId-low16, brightness, elementId-high16). Overlapping segments resolve by the depth it writes, which follows uSurfaceDepth (../_shared/surface-pick.ts): brightness-as-depth (the brightest wins) in the commutative modes, the real projected depth (the front-most wins) in the depth-ordered opaque / normal modes.

    Lines use full pick width (unlike points / gsplats which truncate — thin lines are already narrow with a sharp parabolic profile).

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

    LINE_PICK_VERTEX_SHADER
    LINE_PICK_FRAGMENT_SHADER
    LINE_PICK_SOURCE