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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2015-01-17 16:57:10 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-01-17 16:58:48 +0300
commit448d143ad0e73a9d2c86f84def2b9f89b8332470 (patch)
tree437a63d0e52bf20d9ae9c060315e042935576bd6 /source/blender/gpu
parent82223270a83f76529e0712cedbf128b07c5499ff (diff)
Fix T43273: vector math cross product inconsistent
GLSL missed the normalization step. Reviewers: psy-fi, sergey, mont29 Reviewed By: mont29, sergey Subscribers: mont29 Maniphest Tasks: T43273 Differential Revision: https://developer.blender.org/D1000
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 1e0927d90b3..a79bb239801 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -338,6 +338,7 @@ void vec_math_cross(vec3 v1, vec3 v2, out vec3 outvec, out float outval)
{
outvec = cross(v1, v2);
outval = length(outvec);
+ outvec /= outval;
}
void vec_math_normalize(vec3 v, out vec3 outvec, out float outval)