I’ve discovered precision issues with division in MathMix and MathCombine. It’s currently not possible to get correct results when dividing using attributes, uniforms, or built-in attributes — only manually entered constants produce the expected values.
This appears to be related to the other issue I reported earlier regarding mod(), which was recently fixed here:
This will be fixed in the next build. The solution is the same as the fix applied to the mod() function: we now cast to doubles. I suspect that the error could be coming from a shader compiler optimization.
Instead of doing A / B, the compiler might do A * (1.0 / B) and in your example, 1.0 / 33.0 can’t be precisely represented with floats. As far as I know, there’s no way to disable those optimizations per shader for now.
It stemming perhaps from some compiler optimization does sense. I have seen this kind of floating point error or truncation before indeed, in some GLSL implementations. Tricky stuff to fix systematically, but glad a fix for this one is coming!