aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-09-03 13:21:04 +0200
committerKahrl <kahrl@gmx.net>2013-09-03 13:23:30 +0200
commit1ad9365d34bbc4af1b712c77692fd027ebd4b586 (patch)
tree65f221c346a035a87d872db6ec5ea6206a1516f3 /src
parente61b1773c927cbb8eddd2059cfb3d7c8c14fd149 (diff)
downloadminetest-1ad9365d34bbc4af1b712c77692fd027ebd4b586.tar.gz
minetest-1ad9365d34bbc4af1b712c77692fd027ebd4b586.tar.bz2
minetest-1ad9365d34bbc4af1b712c77692fd027ebd4b586.zip
Fix enable_fog = false not having any effect when shaders are enabled
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 650b5e2f8..d3d49d7b4 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -794,9 +794,9 @@ public:
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
@@ -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,