The minor-axis offset an antialiased line's alpha comes from is computed
with the triangle setup's reciprocal of the line's major length, walking
from v0, and floored; diagonal lines are y-major. exp112 went from 101
differing pixels to 23; the misses left sit at reciprocal segment starts.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The exponent times the log (the float's bits) keeps units of 16 in the bits,
truncated toward zero, not floored at 1. Fixes the last specular pixels at
small exponents (gpu/probe exp102 e = 0.3, exp3, exp4 e = 0.05); all lighting
probes are now bit exact.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Found by the probe regression run on the first lighting probes:
- The normal stays as the world matrix leaves it, and N.L and N.H are
scaled by its GE reciprocal length, like the spot direction. Exact with
scaled, sheared and rotated world matrices (gpu/probe exp3).
- A negative factor (a spot pointing away with cutoff -1) scales the light
by 0 instead of subtracting (exp3, exp4).
- Shade mapping UVs use the same GE arithmetic as lighting (exp2-4).
- The half vector uses the GE's add.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
GEProduct multiplies the significands as integers instead of going through
frexpf/ldexp/trunc in doubles, and GERowSum aligns and adds them as integers.
About 4.5x faster per matrix row on arm64, same results.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The float24 truncations, reciprocal and rsqrt tables, GE adder and row sums,
the setup reciprocal for planes, the mip log2, texture coordinate precision,
the lighting pow and color scaling, and the antialiased line alpha, from
TransformUnit, Rasterizer and Lighting, so they can be unit tested. No
behavior change.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>