[Bf-blender-cvs] [6bfd88a] master: Fix T47670: cycles GLSL incorrect normal map node.

Brecht Van Lommel noreply at git.blender.org
Sun Mar 6 06:55:28 CET 2016


Commit: 6bfd88acd9498bb068bde7ab047a593254b96a88
Author: Brecht Van Lommel
Date:   Sun Mar 6 06:54:40 2016 +0100
Branches: master
https://developer.blender.org/rB6bfd88acd9498bb068bde7ab047a593254b96a88

Fix T47670: cycles GLSL incorrect normal map node.

===================================================================

M	source/blender/nodes/shader/nodes/node_shader_normal_map.c

===================================================================

diff --git a/source/blender/nodes/shader/nodes/node_shader_normal_map.c b/source/blender/nodes/shader/nodes/node_shader_normal_map.c
index 097a492..13bf2a0 100644
--- a/source/blender/nodes/shader/nodes/node_shader_normal_map.c
+++ b/source/blender/nodes/shader/nodes/node_shader_normal_map.c
@@ -48,7 +48,10 @@ static void node_shader_init_normal_map(bNodeTree *UNUSED(ntree), bNode *node)
 
 static int gpu_shader_normal_map(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
 {
-	return GPU_stack_link(mat, "node_normal_map", in, out, GPU_builtin(GPU_VIEW_NORMAL));
+	GPUNodeLink *normal;
+	GPU_link(mat, "direction_transform_m4v3", GPU_builtin(GPU_VIEW_NORMAL), GPU_builtin(GPU_INVERSE_VIEW_MATRIX), &normal);
+
+	return GPU_stack_link(mat, "node_normal_map", in, out, normal);
 }
 
 /* node type definition */




More information about the Bf-blender-cvs mailing list