diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-01-22 21:32:47 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-01-22 21:32:47 +0300 |
commit | 7f65eb3f5346c101d7a341ca0071f2f1a26198db (patch) | |
tree | 35471b6e88133e707b95e24f83164d4f640c43cf /source/blender/render | |
parent | 477078defa0eab48db167a04c208782d1114525c (diff) |
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. :/
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/shadeoutput.c | 4 |
1 files 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]; |