Fix T68537 Eevee: Modulo node behaves unexpectedly/inconsistently

There was still some float imprecision when both input values are equal.
This commit is contained in:
Clément Foucault 2019-08-10 23:29:50 +02:00
parent 55c38f476e
commit 8a338950c6
Notes: blender-bot 2023-02-14 01:15:44 +01:00
Referenced by issue #68537, Eevee: Modulo node behaves unexpectedly/inconsistently
1 changed files with 1 additions and 1 deletions

View File

@ -379,7 +379,7 @@ void math_greater_than(float val1, float val2, out float outval)
void math_modulo(float val1, float val2, out float outval)
{
if (val2 == 0.0) {
if (val2 == 0.0 || val1 == val2) {
outval = 0.0;
}
else {