Shared-math family for the TSL ↔ GLSL parity harness: the erf
polynomial (materials/_shared/erf.ts). 1 registry entry.
The GLSL side injects GLSL_ERF_FUNCTIONS verbatim; the TSL side
builds the same polynomial through erfPolyTSL. Both encode
(erf(x) + 1) / 2 for x swept across [-4, 4] (covering both clamp
regions and the full transition), so ANY structural divergence
between the two builders — Horner order, sign handling, clamp radius,
a drifted coefficient — shows up as a pixel difference. This is the
value-level backend-parity guarantee the module header promises
(literal formatting is the code generator's; see _shared/erf.ts).
Shared-math family for the TSL ↔ GLSL parity harness: the erf polynomial (
materials/_shared/erf.ts). 1 registry entry.The GLSL side injects
GLSL_ERF_FUNCTIONSverbatim; the TSL side builds the same polynomial througherfPolyTSL. Both encode(erf(x) + 1) / 2forxswept across [-4, 4] (covering both clamp regions and the full transition), so ANY structural divergence between the two builders — Horner order, sign handling, clamp radius, a drifted coefficient — shows up as a pixel difference. This is the value-level backend-parity guarantee the module header promises (literal formatting is the code generator's; see_shared/erf.ts).