Set the underwater fog relative to default view distance

0.6.1
scrawl 8 years ago
parent fe439e7bbf
commit ccfebdd2c3

@ -493,9 +493,11 @@ namespace MWRender
mCurrentCameraPos = cameraPos;
if (mWater->isUnderwater(cameraPos))
{
float viewDistance = mViewDistance;
viewDistance = std::min(viewDistance, 6666.f);
setFogColor(mUnderwaterColor * mUnderwaterWeight + mFogColor * (1.f-mUnderwaterWeight));
mStateUpdater->setFogStart(mViewDistance * (1 - mUnderwaterFog));
mStateUpdater->setFogEnd(mViewDistance);
mStateUpdater->setFogStart(viewDistance * (1 - mUnderwaterFog));
mStateUpdater->setFogEnd(viewDistance);
}
else
{

Loading…
Cancel
Save