Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-10 16:39:11 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-10 16:39:11 +0400
commit5424c1fe55966b3bc501a1f7e18bcdf667ce87f9 (patch)
treed7fff6840c41da75e8900a2c93f604209637d290 /source/blender/nodes/texture
parent1c9a24b8ff4b2f3794db3ae203fc93caa5285429 (diff)
Fix #35278: textures nodes Mix RGB node did not have a Use Alpha option like
the compositing node. Note the shader nodes can't have this because color sockets there are only RGB, not RGBA.
Diffstat (limited to 'source/blender/nodes/texture')
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_mixRgb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
index b482a76ae8e..d9361923ac6 100644
--- a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
@@ -52,6 +52,10 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
tex_input_rgba(col1, in[1], p, thread);
tex_input_rgba(col2, in[2], p, thread);
+
+ /* use alpha */
+ if (node->custom2 & 1)
+ fac *= col2[3];
CLAMP(fac, 0.0f, 1.0f);