diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-09-19 20:39:26 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-09-19 20:43:28 +0300 |
commit | f4f190a399fb1bb17d5d80f5f8951a655ca519c6 (patch) | |
tree | 139818ab41f6a1f533ec9c2d77ac5425fe1b1554 /source/blender/nodes | |
parent | 5e2f0adb1b9c8df45e00be579e20144b3972b53b (diff) |
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.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_attribute.c | 9 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_uvmap.c | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_attribute.c b/source/blender/nodes/shader/nodes/node_shader_attribute.c index c92ae28f2e6..ecb8c53c312 100644 --- a/source/blender/nodes/shader/nodes/node_shader_attribute.c +++ b/source/blender/nodes/shader/nodes/node_shader_attribute.c @@ -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; } } diff --git a/source/blender/nodes/shader/nodes/node_shader_uvmap.c b/source/blender/nodes/shader/nodes/node_shader_uvmap.c index 73fb022e476..a2e47735490 100644 --- a/source/blender/nodes/shader/nodes/node_shader_uvmap.c +++ b/source/blender/nodes/shader/nodes/node_shader_uvmap.c @@ -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 */ |