Falloff steepness K = ln(1 / FALLOFF_FLOOR) = ln(100).
IMPORTANT — the toFixed(7) is load-bearing, not cosmetic. Raw
Math.log(100) is 4.605170185988092; interpolating that into the GLSL
shader source (and emitting it via TSL codegen) would rewrite the literal in
every src/tests/__codegen__/*.fragment.glsl.txt snapshot. Rounding to 7
decimals reproduces the exact 4.6051702 those snapshots and the
hand-written GLSL have always contained.
7 is not arbitrary: it is float32's significant-digit count, so
Math.fround(FALLOFF_K) === Math.fround(Math.log(100)) — the rounding is a
no-op on the GPU. Both facts are pinned in falloff.test.ts.
Falloff steepness
K = ln(1 / FALLOFF_FLOOR) = ln(100).IMPORTANT — the
toFixed(7)is load-bearing, not cosmetic. RawMath.log(100)is4.605170185988092; interpolating that into the GLSL shader source (and emitting it via TSL codegen) would rewrite the literal in everysrc/tests/__codegen__/*.fragment.glsl.txtsnapshot. Rounding to 7 decimals reproduces the exact4.6051702those snapshots and the hand-written GLSL have always contained.7 is not arbitrary: it is float32's significant-digit count, so
Math.fround(FALLOFF_K) === Math.fround(Math.log(100))— the rounding is a no-op on the GPU. Both facts are pinned infalloff.test.ts.