XIXs/Blog/2020-08-02

Just had a fun glsl bug that kept me guessing for a while.

Turns out an A*B was getting optimized to 0 when i explicitly set B to 0 but not when I read 0 from an attribute.

Not a problem yup?

Except if A is a nan, you now have different results depending on the source of 0.