Skip to content

Commit 1ad9365

Browse files
committedSep 3, 2013
Fix enable_fog = false not having any effect when shaders are enabled
1 parent e61b177 commit 1ad9365

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/game.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -794,9 +794,9 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter
794794
services->setPixelShaderConstant("skyBgColor", bgcolorfa, 4);
795795

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

802802
// Day-night ratio
@@ -2928,7 +2928,7 @@ void the_game(
29282928
Fog
29292929
*/
29302930

2931-
if(g_settings->getBool("enable_fog") == true && !force_fog_off)
2931+
if(g_settings->getBool("enable_fog") && !force_fog_off)
29322932
{
29332933
driver->setFog(
29342934
bgcolor,

0 commit comments

Comments
 (0)
Please sign in to comment.