diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-11-23 01:23:50 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-11-23 01:23:50 +0300 |
commit | 3892bef1f1491a0419d82bfd7e33966eed01de3b (patch) | |
tree | c128dad667a850500f2f1f464f0a7a888d19a134 /source/blender/nodes | |
parent | 166980b6fe5b532180647165c8984c5440191a49 (diff) |
Fix #24596: specular toggle on material didn't work correct.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/intern/SHD_nodes/SHD_material.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_material.c b/source/blender/nodes/intern/SHD_nodes/SHD_material.c index 4395eef0a5f..3481e7d793e 100644 --- a/source/blender/nodes/intern/SHD_nodes/SHD_material.c +++ b/source/blender/nodes/intern/SHD_nodes/SHD_material.c @@ -235,10 +235,12 @@ static int gpu_shader_material(GPUMaterial *mat, bNode *node, GPUNodeStack *in, /* write to outputs */ if(node->custom1 & SH_NODE_MAT_DIFF) { - if(node->custom1 & SH_NODE_MAT_SPEC) - out[MAT_OUT_COLOR].link= shr.combined; - else - out[MAT_OUT_COLOR].link= shr.diff; + out[MAT_OUT_COLOR].link= shr.combined; + + if(!(node->custom1 & SH_NODE_MAT_SPEC)) { + GPUNodeLink *link; + GPU_link(mat, "vec_math_sub", shr.combined, shr.spec, &out[MAT_OUT_COLOR].link, &link); + } } else if(node->custom1 & SH_NODE_MAT_SPEC) { out[MAT_OUT_COLOR].link= shr.spec; |