From 9b034355e4ad60041b871254acfcc8e4f4f6b39a Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 1 Oct 2019 12:45:13 +0200 Subject: Fix T70405: Geometry node not linking manual derivatives Maniphest Tasks: T70405 Reviewed By: fclem Differential Revision: https://developer.blender.org/D5954 --- source/blender/nodes/shader/nodes/node_shader_geometry.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/nodes') diff --git a/source/blender/nodes/shader/nodes/node_shader_geometry.c b/source/blender/nodes/shader/nodes/node_shader_geometry.c index d94141c3699..e22bbf90a94 100644 --- a/source/blender/nodes/shader/nodes/node_shader_geometry.c +++ b/source/blender/nodes/shader/nodes/node_shader_geometry.c @@ -47,7 +47,7 @@ static int node_shader_gpu_geometry(GPUMaterial *mat, /* Opti: don't request orco if not needed. */ GPUNodeLink *orco_link = (!out[2].hasoutput) ? GPU_constant(val) : GPU_attribute(CD_ORCO, ""); - return GPU_stack_link(mat, + const bool success = GPU_stack_link(mat, node, "node_geometry", in, @@ -58,6 +58,13 @@ static int node_shader_gpu_geometry(GPUMaterial *mat, GPU_builtin(GPU_OBJECT_MATRIX), GPU_builtin(GPU_INVERSE_VIEW_MATRIX), bary_link); + + /* for each output */ + for (int i = 0; sh_node_geometry_out[i].type != -1; i++) { + node_shader_gpu_bump_tex_coord(mat, node, &out[i].link); + } + + return success; } /* node type definition */ -- cgit v1.2.3