From 49f13756382132f9804ed6cf820f7c9661a2e5d6 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 6 Dec 2006 15:48:40 +0000 Subject: [PATCH] Another fix for pass recode: lamp shadow for lamps not in visible render-layers or with option "only layer" was still calculated, giving unnecessary slowdowns. --- source/blender/render/intern/source/shadeinput.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c index 69e9fa71818..a5b4a60861f 100644 --- a/source/blender/render/intern/source/shadeinput.c +++ b/source/blender/render/intern/source/shadeinput.c @@ -879,7 +879,10 @@ void shade_samples_do_shadow(ShadeSample *ssamp) for(sample=0, shi= ssamp->shi; sampletot; shi++, sample++) { float visifac, lv[3], lampdist, inpr; - /* three tests to quickly reject */ + /* tests to quickly reject */ + if(lar->mode & LA_LAYER) if((lar->lay & shi->vlr->lay)==0) continue; + if((lar->lay & shi->lay)==0) continue; + if(!(shi->mode & MA_SHADOW) || (shi->mode & MA_SHLESS)) continue;