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). Brightness-as-depth
keeps overlapping segments correctly resolved.
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.
GLSL3 picking shader source for lines +
ShaderSourcerecord.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
uNodeIduniform andvNodeId/vElementIdvaryings written into the RGBA32F pick buffer as(nodeId, elementId-low16, brightness, elementId-high16). Brightness-as-depth keeps overlapping segments correctly resolved.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.tsland is referenced through theShaderSource.webgpufactory below.