- glm::mat4 m(index[i]->Transform(index.Base()));
- glm::mat4 mvp(chunk_prog.GetVP() * m);
- if (!CullTest(Chunk::Bounds(), mvp)) {
+ box.min = (index[i]->Position() - index.Base()) * ExactLocation::Extent();
+ box.max = box.min + ExactLocation::FExtent();
+
+ if (!CullTest(box, frustum)) {
+
+ //glm::mat4 m(index[i]->Transform(index.Base()));
+ //if (CullTest(Chunk::Bounds(), chunk_prog.GetVP() * m)) {
+ // std::cout << "M = " << m << std::endl;
+ // std::cout << "box = " << box.min << ", " << box.max << std::endl;
+ // std::cout << "should've been culled" << std::endl;
+ //}
+