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
path: root/source
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-08-27 02:49:36 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-08-27 02:50:01 +0300
commitd9be59e872f8a112f31b73f07fe41efb51a08ad9 (patch)
treecef748a27b71a62b98bf02e55f61500fe2df7ac6 /source
parentce2368cf69f5124e0450efb759f2343735c37616 (diff)
Fix T68687 Eevee: Modulo node behaves unexpectedly/inconsistently
This was a regression.
Diffstat (limited to 'source')
-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 57061ad1628..6f5d9b92b8e 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -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)