diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-05-22 17:47:06 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-05-22 17:47:06 +0300 |
commit | 841d008b98de5d0fa106ff3fa4731be63fc29f9a (patch) | |
tree | c02de6bc9cc1de4035dc8c07dc34227841b6aa0f /source/blender/nodes | |
parent | 309f26014b6beb5aaebc0ddc51396647141d417a (diff) |
Fix missing Ignore option for GLSL bump
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_bump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_bump.c b/source/blender/nodes/shader/nodes/node_shader_bump.c index 285dede71e6..b39ca5d90ee 100644 --- a/source/blender/nodes/shader/nodes/node_shader_bump.c +++ b/source/blender/nodes/shader/nodes/node_shader_bump.c @@ -45,13 +45,14 @@ static bNodeSocketTemplate sh_node_bump_out[] = { { -1, 0, "" } }; -static int gpu_shader_bump(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) +static int gpu_shader_bump(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) { if (!in[3].link) in[3].link = GPU_builtin(GPU_VIEW_NORMAL); else GPU_link(mat, "direction_transform_m4v3", in[3].link, GPU_builtin(GPU_VIEW_MATRIX), &in[3].link); - GPU_stack_link(mat, "node_bump", in, out, GPU_builtin(GPU_VIEW_POSITION)); + float invert = node->custom1; + GPU_stack_link(mat, "node_bump", in, out, GPU_builtin(GPU_VIEW_POSITION), GPU_uniform(&invert)); /* Other nodes are applying view matrix if the input Normal has a link. * We don't want normal to have view matrix applied twice, so we cancel it here. * |