Make shadow condition more coherent
This commit is contained in:
parent
6781146f8a
commit
64a64a963b
@ -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);
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user