diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-09 22:41:27 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-09 22:41:27 +0300 |
commit | 664f2d834a9cea8461df27054b90db5d24b7c232 (patch) | |
tree | d08216c0a5bf9812c5754a7ef832510ab9dda3b6 | |
parent | 1d9eb1e0a07dd45217297bedfd033a2bd9bf4750 (diff) |
Fix #20305: overlay blending mode for specular intensity does not work.
-rw-r--r-- | source/blender/render/intern/source/texture.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index 16372d7a15d..9d03889a747 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -1495,6 +1495,14 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen in= 1.0-(facm+fact*(1.0-tex))*(1.0-out); break; + case MTEX_OVERLAY: + facm= 1.0-facg; + if(out < 0.5f) + in = out * (facm + 2.0f*fact*tex); + else + in = 1.0f - (facm + 2.0f*fact*(1.0 - tex)) * (1.0 - out); + break; + case MTEX_SUB: fact= -fact; case MTEX_ADD: |