diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-04-30 16:02:09 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-04-30 16:02:09 +0400 |
commit | e997e6b1fcd0465f0ad110e64c35e71a1d7c2760 (patch) | |
tree | db7b540ea2dbf59cbb86e9eac6d587d90d6be492 /source/blender/render/intern/source/rendercore.c | |
parent | b1d841f2c43430f817e04a0b1f57dda2109021e6 (diff) |
Fix for bug #8963: there was still an issue with SSS and transparency
in the shading because of ramps.
Diffstat (limited to 'source/blender/render/intern/source/rendercore.c')
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 75ff270006c..a18a973979a 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -1430,19 +1430,8 @@ static void shade_sample_sss(ShadeSample *ssamp, Material *mat, ObjectInstanceRe /* texture blending */ texfac= shi->mat->sss_texfac; - alpha= shr.col[3]; + alpha= shr.combined[3]; *area *= alpha; - - if(texfac == 0.0f) { - if(shr.col[0]!=0.0f) color[0] *= alpha/shr.col[0]; - if(shr.col[1]!=0.0f) color[1] *= alpha/shr.col[1]; - if(shr.col[2]!=0.0f) color[2] *= alpha/shr.col[2]; - } - else if(texfac != 1.0f && (alpha > FLT_EPSILON)) { - if(shr.col[0]!=0.0f) color[0] *= alpha*pow(shr.col[0]/alpha, texfac)/shr.col[0]; - if(shr.col[1]!=0.0f) color[1] *= alpha*pow(shr.col[1]/alpha, texfac)/shr.col[1]; - if(shr.col[2]!=0.0f) color[2] *= alpha*pow(shr.col[2]/alpha, texfac)/shr.col[2]; - } } static void zbufshade_sss_free(RenderPart *pa) |