diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-10 16:50:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-10 16:50:30 +0300 |
commit | 668ffcd6e94cb843bf7d00a7bc5a5f454dd5e49a (patch) | |
tree | 90df2c406f9eb6141defa0f5f6d6586451b4cbc7 /source/blender/nodes | |
parent | 01bda15832bf2084618fdbf242cd550f0ebbf727 (diff) |
Fix for wrong flip of Normal node Dot output for new shading system
It was wrong to use invert(), we need to multiply by -1 instead.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_normal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_normal.c b/source/blender/nodes/shader/nodes/node_shader_normal.c index fcd738f0b15..847d2e6a5de 100644 --- a/source/blender/nodes/shader/nodes/node_shader_normal.c +++ b/source/blender/nodes/shader/nodes/node_shader_normal.c @@ -63,8 +63,8 @@ static int gpu_shader_normal(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecDat GPUNodeLink *vec = GPU_uniform(out[0].vec); int ret = GPU_stack_link(mat, "normal", in, out, vec); if (ret && GPU_material_use_new_shading_nodes(mat)) { - float fac[3] = {1.0f, 0.0f, 0.0f}; - GPU_link(mat, "invert", GPU_uniform(fac), out[1].link, &out[1].link); + float fac[3] = {-1.0f, -1.0f, -1.0f}; + GPU_link(mat, "math_multiply", GPU_uniform(fac), out[1].link, &out[1].link); } return ret; } |