Eevee Modulo Error

Eevee has inconsistent results for x mod x for both floats and integers(rounded).


The top half shows the result for floats in [0.0, 1.0]
The bottom half shows the result for integers in [0, 100]

Cycles renders x mod x as 0 for all cases shown here.
The file I used for this image.
EeveeModError.blend (648.5 KB)

This seems to be a replication of the error mentioned here:
Confusion about color difference between eevee and cycles

Should this be a bug report?

Thanks. Yeah, I guess it would be a good idea to file a bug report about this at developer.blender.org. Is it ok if I use your blendfile for this, since that nicely isolates
the issue with the mod-function in eevee? I’ll first search there a bit to see if anyone has already pointed this out.

greetings, Niek

Sure, you can go ahead and report it using the file if you want to.
Thanks :grin:

Edit: If you do report it you may want to note that x / x does not always return 1 as expected.

Try the current 2.81 alpha build. There was just a fix for the modulo node in Eevee that might (or might not) be relevant: https://developer.blender.org/rB3e27dd5b553e83c9d6358f5a93597c86a2bf3cb1

Thanks, I’ve tried it in 2.81 and the issue is still there. I’ve reported it at developer.blender.org as a comment for that fix.

Thanks. I’ve reported it here in a thread already dealing with an improvement of the modulo node for eevee:

https://developer.blender.org/rB3e27dd5b553e83c9d6358f5a93597c86a2bf3cb1

It’s a bit hard to debug things in the shader node editor, because it seems there are no nodes that allow you to inspect the output value of nodes like you can in the animation node editor (with the viewer node).