Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lhofhansl authored and paramat committed Jul 18, 2017
1 parent 5f37efb commit 5045bdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game.cpp
Expand Up @@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "game.h"

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

0 comments on commit 5045bdc

Please sign in to comment.