diff options
author | Matt Ebb <matt@mke3.net> | 2007-08-30 05:47:14 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2007-08-30 05:47:14 +0400 |
commit | 6be47426535b5b44cad98714fb8628b18d56e23d (patch) | |
tree | 91028ad8d3506789307a820b06505e85117b767e /source | |
parent | f386120411b9999e8d4db098567c3b037c9fee0f (diff) |
* Slight change to lamp energy calculation - make lamps invisible
for shading if their 'visibility factor' is below 0.001. This
gives no perceptible visual difference in my tests, but can
significantly speed up shading when using lots of omni lights
with quad falloff over a large area. Since quad lamps never
actually fall off to 0, previously every lamp would be considered
for shading each pixel, even if such lamps had a tiny falloff
distance, and were miles away.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/source/shadeoutput.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index 9543b162133..c8f6bd129c3 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -1113,6 +1113,7 @@ float lamp_get_visibility(LampRen *lar, float *co, float *lv, float *dist) } } } + if (visifac <= 0.001) visifac = 0.0f; return visifac; } } |