Fix T70405: Geometry node not linking manual derivatives

Maniphest Tasks: T70405

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5954
This commit is contained in:
Philipp Oeser 2019-10-01 12:45:13 +02:00
parent 0091b84df0
commit 9b034355e4
Notes: blender-bot 2023-02-14 05:12:59 +01:00
Referenced by issue #70644, Eevee refractions don't work anymore
Referenced by issue #70405, Bump Node not generating normals of textures using Geometry Position
1 changed files with 8 additions and 1 deletions

View File

@ -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 */