Fix T69971 EEVEE: Bump does not work using a UVMap node as input

This fixes both the attribute and the uvmap node. Some other nodes are not
supported but I think it makes little sense.
This commit is contained in:
Clément Foucault 2019-09-19 19:39:26 +02:00
parent 5e2f0adb1b
commit f4f190a399
Notes: blender-bot 2023-02-14 04:24:05 +01:00
Referenced by issue #69971, Bump does not work using a UVMap node as input
2 changed files with 13 additions and 2 deletions

View File

@ -67,7 +67,14 @@ static int node_shader_gpu_attribute(GPUMaterial *mat,
}
else {
GPUNodeLink *cd_attr = GPU_attribute(CD_AUTO_FROM_NAME, attr->name);
return GPU_stack_link(mat, node, "node_attribute", in, out, cd_attr);
GPU_stack_link(mat, node, "node_attribute", in, out, cd_attr);
/* for each output. */
for (int i = 0; sh_node_attribute_out[i].type != -1; i++) {
node_shader_gpu_bump_tex_coord(mat, node, &out[i].link);
}
return 1;
}
}

View File

@ -43,7 +43,11 @@ static int node_shader_gpu_uvmap(GPUMaterial *mat,
NodeShaderUVMap *attr = node->storage;
GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, attr->uv_map);
return GPU_stack_link(mat, node, "node_uvmap", in, out, mtface);
GPU_stack_link(mat, node, "node_uvmap", in, out, mtface);
node_shader_gpu_bump_tex_coord(mat, node, &out[0].link);
return 1;
}
/* node type definition */