Make shadow condition more coherent

This commit is contained in:
Vincent Lejeune 2014-11-18 01:53:02 +01:00
parent 6781146f8a
commit 64a64a963b
2 changed files with 2 additions and 2 deletions

View File

@ -342,7 +342,7 @@ void IrrDriver::renderScene(scene::ICameraSceneNode * const camnode, unsigned po
{
// To avoid wrong culling, use the largest view possible
m_scene_manager->setActiveCamera(m_suncam);
if (!m_mipviz && !m_wireframe && UserConfigParams::m_dynamic_lights &&
if (UserConfigParams::m_dynamic_lights &&
UserConfigParams::m_shadows && !irr_driver->needUBOWorkaround() && hasShadow)
{
PROFILER_PUSH_CPU_MARKER("- Shadow", 0x30, 0x6F, 0x90);

View File

@ -163,7 +163,7 @@ void IrrDriver::renderLights(unsigned pointlightcount, bool hasShadow)
if (!World::getWorld() || World::getWorld()->getTrack()->hasShadows())
{
ScopedGPUTimer timer(irr_driver->getGPUTimer(Q_SUN));
if (World::getWorld() && UserConfigParams::m_shadows && !irr_driver->needUBOWorkaround())
if (World::getWorld() && UserConfigParams::m_shadows && !irr_driver->needUBOWorkaround() && hasShadow)
m_post_processing->renderShadowedSunlight(sun_ortho_matrix, m_rtts->getShadowFBO().getRTT()[0]);
else
m_post_processing->renderSunlight();