Fix for bug #8329: approximate AO with shadow disabled gave artifacts.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 22 Feb 2008 19:29:15 +0000 (19:29 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 22 Feb 2008 19:29:15 +0000 (19:29 +0000)
source/blender/render/intern/source/convertblender.c

index 4245fd06fab948e3624f7d0f8010f801dd4e2bc7..55a1dd664b2803090982afdf00bc9dc881a4acc1 100644 (file)
@@ -4727,7 +4727,8 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
                if((re->wrld.mode & WO_AMB_OCC) && !re->test_break())
                        if(re->wrld.ao_gather_method == WO_AOGATHER_APPROX)
                                if(re->r.renderer==R_INTERN)
-                                       make_occ_tree(re);
+                                       if(re->r.mode & R_SHADOW)
+                                               make_occ_tree(re);
 
                /* SSS */
                if((re->r.mode & R_SSS) && !re->test_break())
@@ -5323,7 +5324,8 @@ void RE_Database_Baking(Render *re, Scene *scene, int type, Object *actob)
        /* occlusion */
        if((re->wrld.mode & WO_AMB_OCC) && !re->test_break())
                if(re->wrld.ao_gather_method == WO_AOGATHER_APPROX)
-                       make_occ_tree(re);
+                       if(re->r.mode & R_SHADOW)
+                               make_occ_tree(re);
 }
 
 /* ------------------------------------------------------------------------- */