1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-12 03:36:32 +00:00

Scale the sunlight specular color by weather's GlareView value (Fixes #3375)

This commit is contained in:
scrawl 2016-05-10 17:39:57 +02:00
parent 17a0353a85
commit 59cfcb38e2
3 changed files with 5 additions and 5 deletions

View File

@ -351,11 +351,11 @@ namespace MWRender
mSunLight->setDirection(osg::Vec3f(1.f,-1.f,-1.f));
}
void RenderingManager::setSunColour(const osg::Vec4f &colour)
void RenderingManager::setSunColour(const osg::Vec4f& diffuse, const osg::Vec4f& specular)
{
// need to wrap this in a StateUpdater?
mSunLight->setDiffuse(colour);
mSunLight->setSpecular(colour);
mSunLight->setDiffuse(diffuse);
mSunLight->setSpecular(specular);
}
void RenderingManager::setSunDirection(const osg::Vec3f &direction)

View File

@ -91,7 +91,7 @@ namespace MWRender
void skySetMoonColour(bool red);
void setSunDirection(const osg::Vec3f& direction);
void setSunColour(const osg::Vec4f& colour);
void setSunColour(const osg::Vec4f& diffuse, const osg::Vec4f& specular);
void configureAmbient(const ESM::Cell* cell);
void configureFog(const ESM::Cell* cell);

View File

@ -722,7 +722,7 @@ void WeatherManager::update(float duration, bool paused)
mRendering.configureFog(mResult.mFogDepth, underwaterFog, mResult.mFogColor);
mRendering.setAmbientColour(mResult.mAmbientColor);
mRendering.setSunColour(mResult.mSunColor);
mRendering.setSunColour(mResult.mSunColor, mResult.mSunColor * mResult.mGlareView);
mRendering.getSkyManager()->setWeather(mResult);