Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-08-11 00:29:50 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-08-14 14:36:56 +0300
commit8a338950c6ddde37ddefadd75c39d4d2efc7aee3 (patch)
tree27c0459df4701c2967470dd3b5aac913bddd2bb9 /source/blender/gpu
parent55c38f476e6d599eb5377334976ab71b97fe359a (diff)
Fix T68537 Eevee: Modulo node behaves unexpectedly/inconsistently
There was still some float imprecision when both input values are equal.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl2
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 {