Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    FALLOFF_K: number = ...

    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.