aboutsummaryrefslogtreecommitdiff
path: root/src/client/game.cpp
diff options
context:
space:
mode:
authorlhofhansl <larsh@apache.org>2022-12-25 16:15:32 -0800
committerGitHub <noreply@github.com>2022-12-25 16:15:32 -0800
commit1e7804aaf66e2c2a81f81267923621dea17cb274 (patch)
tree15de0319b559a7679659d66b2b389d71e97352b6 /src/client/game.cpp
parentafd5caa26a2352c912e1a1976b59e1f89773cdec (diff)
downloadminetest-1e7804aaf66e2c2a81f81267923621dea17cb274.tar.xz
Allow saturation to be controlled by the server. (#13075)
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r--src/client/game.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 486ab41a3..078998bf7 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -436,7 +436,6 @@ class GameGlobalShaderConstantSetter : public IShaderConstantSetter
float m_bloom_strength;
CachedPixelShaderSetting<float> m_bloom_radius_pixel;
float m_bloom_radius;
- float m_saturation;
CachedPixelShaderSetting<float> m_saturation_pixel;
public:
@@ -452,8 +451,6 @@ public:
m_bloom_strength = RenderingEngine::BASE_BLOOM_STRENGTH * g_settings->getFloat("bloom_strength_factor", 0.1f, 10.0f);
if (name == "bloom_radius")
m_bloom_radius = g_settings->getFloat("bloom_radius", 0.1f, 8.0f);
- if (name == "saturation")
- m_saturation = g_settings->getFloat("saturation", 0.0f, 5.0f);
}
static void settingsCallback(const std::string &name, void *userdata)
@@ -503,7 +500,6 @@ public:
m_bloom_intensity = g_settings->getFloat("bloom_intensity", 0.01f, 1.0f);
m_bloom_strength = RenderingEngine::BASE_BLOOM_STRENGTH * g_settings->getFloat("bloom_strength_factor", 0.1f, 10.0f);
m_bloom_radius = g_settings->getFloat("bloom_radius", 0.1f, 8.0f);
- m_saturation = g_settings->getFloat("saturation", 0.0f, 5.0f);
}
~GameGlobalShaderConstantSetter()
@@ -591,7 +587,8 @@ public:
m_bloom_radius_pixel.set(&m_bloom_radius, services);
m_bloom_strength_pixel.set(&m_bloom_strength, services);
}
- m_saturation_pixel.set(&m_saturation, services);
+ float saturation = m_client->getEnv().getLocalPlayer()->getLighting().saturation;
+ m_saturation_pixel.set(&saturation, services);
}
void onSetMaterial(const video::SMaterial &material)