Line picking material TSL factory — NodeMaterial counterpart to
LINE_PICK_SOURCE in shaders.ts.
Mirrors the visual factory's sprite-expansion math, but the fragment
outputs:
R: nodeId (set via uniform)
G: elementId LOW 16 bits (= aSortedIndex, the STORAGE slot —
identical to the draw slot under identity ordering, and stays
correct once the sort worker permutes draw order)
B: brightness (perpendicular falloff × cap × widthScale × widthFade)
A: the same elementId's HIGH 16 bits (one f32 channel cannot
carry the whole index exactly — see luxarElementIdParts)
Per-segment data comes from the RGBA32F line texture (uLineTex,
6 texels/segment — layout in rendering/line-geometry.ts), fetched
in the vertex stage and indexed by aSortedIndex (visual-factory
parity, shader-tsl.ts).
Line picking material TSL factory — NodeMaterial counterpart to
LINE_PICK_SOURCEinshaders.ts.Mirrors the visual factory's sprite-expansion math, but the fragment outputs:
aSortedIndex, the STORAGE slot — identical to the draw slot under identity ordering, and stays correct once the sort worker permutes draw order)luxarElementIdParts)Per-segment data comes from the RGBA32F line texture (
uLineTex, 6 texels/segment — layout inrendering/line-geometry.ts), fetched in the vertex stage and indexed byaSortedIndex(visual-factory parity, shader-tsl.ts).Depth = 1.0 - brightness (brightness-as-depth tie-breaking).
Lines use FULL width for picking (no half-radius like points) — thin lines would be impossible to pick otherwise.