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

pull/1/head
scrawl 9 years ago
parent 17a0353a85
commit 59cfcb38e2

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

@ -91,7 +91,7 @@ namespace MWRender
void skySetMoonColour(bool red); void skySetMoonColour(bool red);
void setSunDirection(const osg::Vec3f& direction); 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 configureAmbient(const ESM::Cell* cell);
void configureFog(const ESM::Cell* cell); void configureFog(const ESM::Cell* cell);

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

Loading…
Cancel
Save