The line pixel-width scale, resY * |P11| (replacing the former CPU-pushed
perspective / ortho line-scale uniforms). Declared once as a vertex-stage global and assigned as
the FIRST statement of main() (luxarLineScale = uResolution.y * luxarProjectionSizeScale();), so every consumer — the line shader body and
the shared width/join helpers — reads it exactly where the uniform used to be
read, in the same expression shape (width * luxarLineScale / dist).
Inlining the product at each use site instead lets the compiler associate it
differently per site, a per-vertex rounding change measured at ~10x the flips
of a 1-ulp change in the scale itself (ANGLE/Metal, render gate).
The line pixel-width scale, resY * |P11| (replacing the former CPU-pushed perspective / ortho line-scale uniforms). Declared once as a vertex-stage global and assigned as the FIRST statement of
main()(luxarLineScale = uResolution.y * luxarProjectionSizeScale();), so every consumer — the line shader body and the shared width/join helpers — reads it exactly where the uniform used to be read, in the same expression shape (width * luxarLineScale / dist). Inlining the product at each use site instead lets the compiler associate it differently per site, a per-vertex rounding change measured at ~10x the flips of a 1-ulp change in the scale itself (ANGLE/Metal, render gate).