1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 18:53:54 +00:00

Restore handling of fog depth == 0 values (Bug #1549)

This commit is contained in:
scrawl 2015-08-19 01:13:14 +02:00
parent dca08b0b42
commit 681183df31

View file

@ -379,8 +379,17 @@ namespace MWRender
else else
{ {
setFogColor(mFogColor); setFogColor(mFogColor);
mStateUpdater->setFogStart(mViewDistance * (1 - mFogDepth));
mStateUpdater->setFogEnd(mViewDistance); if (mFogDepth == 0.f)
{
mStateUpdater->setFogStart(0.f);
mStateUpdater->setFogEnd(FLT_MAX);
}
else
{
mStateUpdater->setFogStart(mViewDistance * (1 - mFogDepth));
mStateUpdater->setFogEnd(mViewDistance);
}
} }
} }