diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-09-28 18:08:33 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-09-28 18:08:33 +0400 |
commit | bf8cd9011de98dbe414100ae01777fa8d9f677a1 (patch) | |
tree | c3d6d3cea90f69c975b5bed2c13a2f8f1d5bd0f6 /source/blender | |
parent | 221ef3c29fa696eeffbd14199c4520cf89b936ee (diff) |
Fix T41978: Shadow was not excluded from combined path unless shadow pass was rendered too.
Pretty straightforward, issue probably goes back to (pre)history!
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/render/intern/source/shadeoutput.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index 6d6bba834ba..e0e4d59aee4 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -1494,11 +1494,14 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int add_to_diffuse(shr->shad, shi, is, lashdw[0]*(i_noshad-i)*lacol[0], lashdw[1]*(i_noshad-i)*lacol[1], lashdw[2]*(i_noshad-i)*lacol[2]); } if (i_noshad>0.0f) { - if (passflag & (SCE_PASS_DIFFUSE|SCE_PASS_SHADOW)) { + if (passflag & (SCE_PASS_DIFFUSE|SCE_PASS_SHADOW) || + ((passflag & SCE_PASS_COMBINED) && !(shi->combinedflag & SCE_PASS_SHADOW))) + { add_to_diffuse(shr->diff, shi, is, i_noshad*lacol[0], i_noshad*lacol[1], i_noshad*lacol[2]); } - else + else { copy_v3_v3(shr->diff, shr->shad); + } } } @@ -1889,7 +1892,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr) } if (shi->combinedflag & SCE_PASS_SHADOW) - copy_v3_v3(shr->diffshad, shr->shad); /* note, no ';' ! */ + copy_v3_v3(shr->diffshad, shr->shad); else copy_v3_v3(shr->diffshad, shr->diff); |