forked from teamnwah/openmw-tes3coop
Scale the sunlight specular color by weather's GlareView value (Fixes #3375)
This commit is contained in:
parent
17a0353a85
commit
59cfcb38e2
3 changed files with 5 additions and 5 deletions
|
@ -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…
Reference in a new issue