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.
GLSL3 picking shader source for points +
ShaderSourcerecord.Mirrors the visual point shader in
rendering/materials/point/shader-glsl.tswith three picking-specific additions:uNodeIduniform +vNodeId/vElementIdvaryings, written into the RGBA32F pick buffer as(nodeId, elementId-low16, brightness, elementId-high16).../_shared/visibility-glsl.ts), so an invisible point is not pickable.opaque/normalmodes (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.tsland is referenced through theShaderSource.webgpufactory below.