Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix enable_fog = false not having any effect when shaders are enabled
  • Loading branch information
kahrl committed Sep 3, 2013
1 parent e61b177 commit 1ad9365
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/game.cpp
Expand Up @@ -794,9 +794,9 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter
services->setPixelShaderConstant("skyBgColor", bgcolorfa, 4);

// Fog distance
float fog_distance = *m_fog_range;
if(*m_force_fog_off)
fog_distance = 10000*BS;
float fog_distance = 10000*BS;
if(g_settings->getBool("enable_fog") && !*m_force_fog_off)
fog_distance = *m_fog_range;
services->setPixelShaderConstant("fogDistance", &fog_distance, 1);

// Day-night ratio
Expand Down Expand Up @@ -2928,7 +2928,7 @@ void the_game(
Fog
*/

if(g_settings->getBool("enable_fog") == true && !force_fog_off)
if(g_settings->getBool("enable_fog") && !force_fog_off)
{
driver->setFog(
bgcolor,
Expand Down

0 comments on commit 1ad9365

Please sign in to comment.