svn merge -r 17502:18705 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / render / intern / source / occlusion.c
index 494feb96c187ff1a0d302bea7e7317900409390a..9ce274ba775207f5f76b7cebb2710509681ab47c 100644 (file)
@@ -630,7 +630,7 @@ static OcclusionTree *occ_tree_build(Render *re)
                        if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak;
                        else vlr++;
 
-                       if(vlr->mat->mode & MA_TRACEBLE)
+                       if((vlr->mat->mode & MA_TRACEBLE) && (vlr->mat->material_type == MA_SOLID))
                                totface++;
                }
        }
@@ -663,7 +663,7 @@ static OcclusionTree *occ_tree_build(Render *re)
                        if((a & 255)==0) vlr= obr->vlaknodes[a>>8].vlak;
                        else vlr++;
 
-                       if(vlr->mat->mode & MA_TRACEBLE) {
+                       if((vlr->mat->mode & MA_TRACEBLE) && (vlr->mat->material_type == MA_SOLID)) {
                                tree->face[b].obi= c;
                                tree->face[b].facenr= a;
                                tree->occlusion[b]= 1.0f;