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:
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
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue