If there is a sphericalHarmonicsTexture, kill ambient.

This commit is contained in:
Vincent Lejeune 2014-07-29 00:19:50 +02:00
parent b9e56303c1
commit 13f22ab1cd
2 changed files with 3 additions and 3 deletions

View File

@ -141,6 +141,9 @@ void IrrDriver::renderGLSL(float dt)
const core::recti &viewport = camera->getViewport();
if (World::getWorld() && World::getWorld()->getTrack()->hasShadows() && !SphericalHarmonicsTextures.empty())
irr_driver->getSceneManager()->setAmbientLight(SColor(0, 0, 0, 0));
unsigned plc = UpdateLightsInfo(camnode, dt);
computeCameraMatrix(camnode, viewport.LowerRightCorner.X - viewport.UpperLeftCorner.X, viewport.LowerRightCorner.Y - viewport.UpperLeftCorner.Y);
renderScene(camnode, plc, glows, dt, track->hasShadows(), false);

View File

@ -168,9 +168,6 @@ void IrrDriver::renderLights(unsigned pointlightcount)
}
m_rtts->getFBO(FBO_COMBINED_TMP1_TMP2).Bind();
if (World::getWorld() && World::getWorld()->getTrack()->hasShadows() && SkyboxCubeMap)
irr_driver->getSceneManager()->setAmbientLight(SColor(0, 0, 0, 0));
// Render sunlight if and only if track supports shadow
if (!World::getWorld() || World::getWorld()->getTrack()->hasShadows())
{