Notes · Lab Notes
One NaN pixel can turn the whole frame black
· webgl · debugging
The night scene rendered pure black. The culprit was pow(1.0 - vT, 1.6) with vT slightly above 1: pow of a negative base is NaN, and the bloom pass's blur spread that single NaN across the entire image. Clamp the base, pow(clamp(x, 0.0, 1.0), k), and the frame comes back.