From 2b1c5be3158a9ca31ddd185692a887a82975f871 Mon Sep 17 00:00:00 2001 From: vlj Date: Wed, 3 Sep 2014 03:07:45 +0200 Subject: [PATCH] Use more aggressive culling. --- src/graphics/stkscenemanager.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/graphics/stkscenemanager.cpp b/src/graphics/stkscenemanager.cpp index 5fc5af187..8b60038c6 100644 --- a/src/graphics/stkscenemanager.cpp +++ b/src/graphics/stkscenemanager.cpp @@ -350,10 +350,11 @@ parseSceneManager(core::list List, std::vectorisVisible()) continue; (*I)->updateAbsolutePosition(); - + (*I)->setAutomaticCulling(scene::EAC_FRUSTUM_BOX); scene::ICameraSceneNode* cam = irr_driver->getSceneManager()->getActiveCamera(); bool IsCulledForSolid = irr_driver->getSceneManager()->isCulled(*I); bool IsCulledForShadow[4]; + for (unsigned i = 0; i < 4; ++i) { scene::ICameraSceneNode* cam = shadowCams[i]; @@ -365,9 +366,6 @@ parseSceneManager(core::list List, std::vectorgetSceneManager()->isCulled(*I); irr_driver->getSceneManager()->setActiveCamera(cam); - if (IsCulledForSolid && IsCulledForShadow[0] && IsCulledForShadow[1] && IsCulledForShadow[2] && IsCulledForShadow[3]) - continue; - if (!IsCulledForSolid) { if (ParticleSystemProxy *node = dynamic_cast(*I))