shader vacuuming
[carveJwlIkooP6JGAAIwe30JlM.git] / scene.h
diff --git a/scene.h b/scene.h
index bf69a632b0aab6cd46e6937357391c0ec7c8708b..63b351d3e320fd74b5527a0b5532b786a5231c0c 100644 (file)
--- a/scene.h
+++ b/scene.h
@@ -297,7 +297,20 @@ VG_STATIC float scene_bh_centroid( void *user, u32 item_index, int axis )
               *pb = &s->arrvertices[ s->arrindices[item_index*3+1] ],
               *pc = &s->arrvertices[ s->arrindices[item_index*3+2] ];
 
+   #if 0
+
+   float min, max;
+
+   min = vg_minf( pa->co[axis], pb->co[axis] );
+   max = vg_maxf( pa->co[axis], pb->co[axis] );
+   min = vg_minf( min, pc->co[axis] );
+   max = vg_maxf( max, pc->co[axis] );
+
+   return (min+max) * 0.5f;
+
+   #else
    return (pa->co[axis] + pb->co[axis] + pc->co[axis]) * (1.0f/3.0f);
+   #endif
 }
 
 VG_STATIC void scene_bh_swap( void *user, u32 ia, u32 ib )