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:
authorCarlo Andreacchio <carlorules@gmail.com>2017-05-09 13:31:19 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-05-09 13:32:47 +0300
commitffc95a33b62821e8eb66cf7003942e37976d20d7 (patch)
tree5510daafd280abaa41f31cb4e766c142058b75a7 /source/blender/gpu
parent06b2f10ad1cb697218ac48ec7546139615ee682a (diff)
Fix T51434: Module math operation is wrong in GLSL shading
Based on patch from @lazydodo. Reviewers: sergey Differential Revision: https://developer.blender.org/D2661
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 b88fba12f55..42561d7baaf 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -403,7 +403,7 @@ void math_modulo(float val1, float val2, out float outval)
/* change sign to match C convention, mod in GLSL will take absolute for negative numbers,
* see https://www.opengl.org/sdk/docs/man/html/mod.xhtml */
- outval = (val1 > 0.0) ? outval : -outval;
+ outval = (val1 > 0.0) ? outval : outval - val2;
}
void math_abs(float val1, out float outval)