mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Fix enable_fog = false not having any effect when shaders are enabled
This commit is contained in:
parent
e61b1773c9
commit
1ad9365d34
@ -794,9 +794,9 @@ public:
|
|||||||
services->setPixelShaderConstant("skyBgColor", bgcolorfa, 4);
|
services->setPixelShaderConstant("skyBgColor", bgcolorfa, 4);
|
||||||
|
|
||||||
// Fog distance
|
// Fog distance
|
||||||
float fog_distance = *m_fog_range;
|
float fog_distance = 10000*BS;
|
||||||
if(*m_force_fog_off)
|
if(g_settings->getBool("enable_fog") && !*m_force_fog_off)
|
||||||
fog_distance = 10000*BS;
|
fog_distance = *m_fog_range;
|
||||||
services->setPixelShaderConstant("fogDistance", &fog_distance, 1);
|
services->setPixelShaderConstant("fogDistance", &fog_distance, 1);
|
||||||
|
|
||||||
// Day-night ratio
|
// Day-night ratio
|
||||||
@ -2928,7 +2928,7 @@ void the_game(
|
|||||||
Fog
|
Fog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(g_settings->getBool("enable_fog") == true && !force_fog_off)
|
if(g_settings->getBool("enable_fog") && !force_fog_off)
|
||||||
{
|
{
|
||||||
driver->setFog(
|
driver->setFog(
|
||||||
bgcolor,
|
bgcolor,
|
||||||
|
Loading…
Reference in New Issue
Block a user