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 3σ for visual) so the pick footprint
is the bright core only.
Always max-projection (no ray-integral) — picking only needs the
brightest fragment, not the integrated path.
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.
GLSL3 picking shader source for Gaussian splats +
ShaderSourcerecord.Mirrors the visual gsplat shader with picking-specific adjustments:
uNodeIduniform +vNodeId/vElementIdvaryings, written into the RGBA32F pick buffer as(nodeId, elementId-low16, brightness, elementId-high16).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.tsland is referenced through theShaderSource.webgpufactory below.