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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-05-08 00:24:06 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-05-08 00:24:06 +0400
commit3527c100652f029db7a0e5af27a16456ff5ae1df (patch)
treeb46239654e2d1a6c230d73a2ecad4cd1b0cbdb0b /source/blender/render
parent1584d6a0069758d8b594b0e2c412677ab5a8f22f (diff)
Fix for bug #10932: area light bug, points behind the lamp could
also get lit.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/shadeoutput.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 9f14db2f425..0928042729a 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -477,8 +477,12 @@ static float area_lamp_energy_multisample(LampRen *lar, float *co, float *vn)
float *jitlamp= lar->jitter, vec[3];
float area[4][3], intens= 0.0f;
int a= lar->ray_totsamp;
-
-
+
+ /* test if co is behind lamp */
+ VECSUB(vec, co, lar->co);
+ if(INPR(vec, lar->vec) < 0.0f)
+ return 0.0f;
+
while(a--) {
vec[0]= jitlamp[0];
vec[1]= jitlamp[1];