Fix T68687 Eevee: Modulo node behaves unexpectedly/inconsistently

This was a regression.
This commit is contained in:
Clément Foucault 2019-08-27 01:49:36 +02:00
parent ce2368cf69
commit d9be59e872
Notes: blender-bot 2023-02-14 08:59:10 +01:00
Referenced by issue #68687, Eevee: Modulo node behaves unexpectedly/inconsistently
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ void math_fraction(float a, float b, out float result)
*/
void math_modulo(float a, float b, out float result)
{
result = (b != 0.0) ? sign(a) * mod(abs(a), b) : 0.0;
result = (b != 0.0 && a != b) ? sign(a) * mod(abs(a), b) : 0.0;
}
void math_sine(float a, float b, out float result)