diff options
author | Roland Hess <me@harkyman.com> | 2009-11-09 22:20:48 +0300 |
---|---|---|
committer | Roland Hess <me@harkyman.com> | 2009-11-09 22:20:48 +0300 |
commit | 6dd96fcfa866316b8c278906edaa0c4b43ee5c92 (patch) | |
tree | 05e392921c1f1710a518e717ab473ac0fb917d14 /source | |
parent | 45c0f70e3e6198e15b6010153b8c6eb5914feb31 (diff) |
Update of older commit (23102) from Bob Holcomb -- fix for Darken mode blending was only in place for nodes, not for general texture blending. This updates texture blending to reflect the fix. Now results don't trend toward black on Darken anymore as factor approaches 0.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/source/texture.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index 9510dc15e5a..a74bd3e8041 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -1416,11 +1416,11 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg fact*= facg; facm= 1.0-fact; - col= fact*tex[0]; + col= tex[0]+((1-tex[0])*facm); if(col < out[0]) in[0]= col; else in[0]= out[0]; - col= fact*tex[1]; + col= tex[1]+((1-tex[1])*facm); if(col < out[1]) in[1]= col; else in[1]= out[1]; - col= fact*tex[2]; + col= tex[2]+((1-tex[2])*facm); if(col < out[2]) in[2]= col; else in[2]= out[2]; break; |