Fix #26571: slow approximate AO with zero area faces.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 23 Mar 2011 23:07:09 +0000 (23:07 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 23 Mar 2011 23:07:09 +0000 (23:07 +0000)
source/blender/render/intern/source/occlusion.c

index cb6a8a102d018ad62c8a5e081ae2a46d276e911c..8f070421890598744783ee308dad19079a700a8f 100644 (file)
@@ -613,7 +613,8 @@ static void occ_build_recursive(OcclusionTree *tree, OccNode *node, int begin, i
 
        /* compute maximum distance from center */
        node->dco= 0.0f;
-       occ_build_dco(tree, node, node->co, &node->dco);
+       if(node->area > 0.0f)
+               occ_build_dco(tree, node, node->co, &node->dco);
 }
 
 static void occ_build_sh_normalize(OccNode *node)