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.
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).uCoverageTruncate).../_shared/visibility-glsl.ts), so a splat is pickable exactly when it is visible.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.