diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-08-11 00:29:50 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-08-14 14:36:56 +0300 |
commit | 8a338950c6ddde37ddefadd75c39d4d2efc7aee3 (patch) | |
tree | 27c0459df4701c2967470dd3b5aac913bddd2bb9 | |
parent | 55c38f476e6d599eb5377334976ab71b97fe359a (diff) |
Fix T68537 Eevee: Modulo node behaves unexpectedly/inconsistently
There was still some float imprecision when both input values are equal.
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 66d8bf996ba..83d008c3441 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -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 { |