Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-09-28 18:08:33 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-10-03 17:09:27 +0400
commit76935072a6f04634b718ffb3bb18a7137ff89343 (patch)
treee23ec92fd65a96ce41096e9e9213adf2b799c981 /source
parent235b58ef310b7aaab67cc490c0e22e599198565d (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')
-rw-r--r--source/blender/render/intern/source/shadeoutput.c9
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 427d0eeed11..e703cccb32d 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);