Commit: 0dc7e31938f7bbbb5e77a87b17f9a7a53c973dc3
Author: OmarSquircleArt
Date: Fri Aug 2 14:13:34 2019 +0200
Branches: soc-2019-cycles-procedural
https://developer.blender.org/rB0dc7e31938f7bbbb5e77a87b17f9a7a53c973dc3
Use C sign convention in Vector Modulo and fix zero division.
===================================================================
M source/blender/gpu/shaders/gpu_shader_material.glsl
===================================================================
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl
b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 89bd2f4eb47..8f1d4a0504d 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -554,7 +554,9 @@ void vec_math_snap(vec3 a, vec3 b, float scale, out vec3
outvec, out float outva
void vec_math_modulo(vec3 a, vec3 b, float scale, out vec3 outvec, out float
outval)
{
- outvec = mod(a, b);
+ math_modulo(a.x, b.x, outvec.x);
+ math_modulo(a.y, b.y, outvec.y);
+ math_modulo(a.z, b.z, outvec.z);
}
void vec_math_absolute(vec3 a, vec3 b, float scale, out vec3 outvec, out float
outval)
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs