mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Set the underwater fog relative to default view distance
This commit is contained in:
parent
fe439e7bbf
commit
ccfebdd2c3
1 changed files with 4 additions and 2 deletions
|
@ -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…
Reference in a new issue