From 7f65eb3f5346c101d7a341ca0071f2f1a26198db Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 22 Jan 2016 19:32:47 +0100 Subject: Fix part of T47025: Shadow pass error: Black shadow. Skipping computing of shadow pass when diffuse color is pitch black is fine... unless you actually need/want that shadow pass! The 'noisy' issue with picture texture remains a bit mysterious to me currently. :/ --- source/blender/render/intern/source/shadeoutput.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index 3b7c7b110d4..27c0f5d81ec 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -1914,8 +1914,8 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr) copy_v3_v3(shr->combined, shr->diffshad); /* calculate shadow pass, we use a multiplication mask */ - /* if diff = 0,0,0 it doesn't matter what the shadow pass is, so leave it as is */ - if (passflag & SCE_PASS_SHADOW && !(shr->diff[0]==0.0f && shr->diff[1]==0.0f && shr->diff[2]==0.0f)) { + /* Even if diff = 0,0,0, it does matter what the shadow pass is, since we may want it 'for itself'! */ + if (passflag & SCE_PASS_SHADOW) { if (shr->diff[0]!=0.0f) shr->shad[0]= shr->shad[0]/shr->diff[0]; /* can't determine proper shadow from shad/diff (0/0), so use shadow intensity */ else if (shr->shad[0]==0.0f) shr->shad[0]= shr->shad[3]; -- cgit v1.2.3