From 22df42cdecbf29d886ea6cf81810ecbc575522e4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 27 Apr 2009 11:49:40 +0000 Subject: Fix for bug #18032: AAO pixel cache + refraction artifacts, the pixel cache can only be used for the first hit. --- source/blender/render/intern/source/occlusion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/render') diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index 494feb96c18..f9301bc0805 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -1632,7 +1632,7 @@ void sample_occ(Render *re, ShadeInput *shi) sample_occ_surface(shi); } /* try to get result from the cache if possible */ - else if(!sample_occ_cache(tree, shi->co, shi->vno, shi->xs, shi->ys, shi->thread, shi->ao)) { + else if(shi->depth!=0 || !sample_occ_cache(tree, shi->co, shi->vno, shi->xs, shi->ys, shi->thread, shi->ao)) { /* no luck, let's sample the occlusion */ exclude.obi= shi->obi - re->objectinstance; exclude.facenr= shi->vlr->index; -- cgit v1.2.3