Skip to content

Commit 5045bdc

Browse files
lhofhanslparamat
authored andcommittedJul 18, 2017
In-cloud fog: Strengthen effect when small view range is used
Ensure in-cloud fog is always stronger than outside-of-cloud-fog even when using a small view range. Also limit in-cloud fog range to a maximum of 32 nodes to keep it fairly strong when using a large view range.
1 parent 5f37efb commit 5045bdc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/game.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2020
#include "game.h"
2121

2222
#include <iomanip>
23+
#include <cmath>
2324
#include "client/renderingengine.h"
2425
#include "camera.h"
2526
#include "client.h"
@@ -4124,7 +4125,7 @@ void Game::updateFrame(ProfilerGraph *graph, RunStats *stats, f32 dtime,
41244125
.getInterpolated(video::SColor(255, 0, 0, 0), 0.9);
41254126
sky->overrideColors(clouds_dark, clouds->getColor());
41264127
sky->setBodiesVisible(false);
4127-
runData.fog_range = 20.0f * BS;
4128+
runData.fog_range = std::fmin(runData.fog_range * 0.5f, 32.0f * BS);
41284129
// do not draw clouds after all
41294130
clouds->setVisible(false);
41304131
}

0 commit comments

Comments
 (0)
Please sign in to comment.