Merge branch 'sunvisibility' into 'master'

Make sun specularity behavior more intuitive (bug #6190)

Closes #6190

See merge request OpenMW/openmw!3535
This commit is contained in:
Zackhasacat 2023-11-05 17:55:27 +00:00
commit 231803c6ea
4 changed files with 10 additions and 7 deletions

View file

@ -702,7 +702,7 @@ namespace MWRender
{
// need to wrap this in a StateUpdater?
mSunLight->setDiffuse(diffuse);
mSunLight->setSpecular(specular);
mSunLight->setSpecular(osg::Vec4f(specular.x(), specular.y(), specular.z(), specular.w() * sunVis));
mPostProcessor->getStateUpdater()->setSunColor(diffuse);
mPostProcessor->getStateUpdater()->setSunVis(sunVis);

View file

@ -789,8 +789,7 @@ namespace MWWorld
mRendering.configureFog(
mResult.mFogDepth, underwaterFog, mResult.mDLFogFactor, mResult.mDLFogOffset / 100.0f, mResult.mFogColor);
mRendering.setAmbientColour(mResult.mAmbientColor);
mRendering.setSunColour(
mResult.mSunColor, mResult.mSunColor * mResult.mGlareView * glareFade, mResult.mGlareView * glareFade);
mRendering.setSunColour(mResult.mSunColor, mResult.mSunColor, mResult.mGlareView * glareFade);
mRendering.getSkyManager()->setWeather(mResult);