Honor the per-track flag to disable god rays

This commit is contained in:
Marianne Gagnon 2014-04-24 19:24:23 -04:00
parent c5fbd5ff84
commit 97b6db3fdc
2 changed files with 3 additions and 2 deletions

View File

@ -655,7 +655,8 @@ void PostProcessing::render()
std::swap(in_fbo, out_fbo);
PROFILER_PUSH_CPU_MARKER("- Godrays", 0xFF, 0x00, 0x00);
if (UserConfigParams::m_light_shaft && m_sunpixels > 30)//World::getWorld()->getTrack()->hasGodRays() && ) // god rays
const bool hasgodrays = World::getWorld()->getTrack()->hasGodRays();
if (UserConfigParams::m_light_shaft && m_sunpixels > 30 && hasgodrays)
{
glEnable(GL_DEPTH_TEST);
// Grab the sky

View File

@ -236,7 +236,7 @@ void IrrDriver::renderGLSL(float dt)
// Is the lens flare enabled & visible? Check last frame's query.
const bool hasflare = World::getWorld()->getTrack()->hasLensFlare();
const bool hasgodrays = World::getWorld()->getTrack()->hasGodRays();
if (UserConfigParams::m_light_shaft)//hasflare || hasgodrays)
if (UserConfigParams::m_light_shaft && hasgodrays)//hasflare || hasgodrays)
{
irr::video::COpenGLDriver* gl_driver = (irr::video::COpenGLDriver*)m_device->getVideoDriver();