aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2022-01-31 21:48:14 +0000
committerGitHub <noreply@github.com>2022-01-31 21:48:14 +0000
commitc61998bd2000427b96fc506edffa9fa4e27a1a9b (patch)
tree9d1ffe2bca19ca3c2c8290daa512c84e17b7269a /src
parent1e4d6672be35e075de6add3d4d4e97793a911efc (diff)
downloadminetest-c61998bd2000427b96fc506edffa9fa4e27a1a9b.tar.gz
minetest-c61998bd2000427b96fc506edffa9fa4e27a1a9b.tar.bz2
minetest-c61998bd2000427b96fc506edffa9fa4e27a1a9b.zip
Revert "Disable dynamic shadows for the 5.5.0 release" (#12032)
Diffstat (limited to 'src')
-rw-r--r--src/client/mapblock_mesh.cpp2
-rw-r--r--src/client/render/core.cpp2
-rw-r--r--src/client/renderingengine.h4
-rw-r--r--src/client/shader.cpp2
-rw-r--r--src/client/sky.cpp2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp
index 249a56087..03522eca9 100644
--- a/src/client/mapblock_mesh.cpp
+++ b/src/client/mapblock_mesh.cpp
@@ -861,7 +861,7 @@ static void updateFastFaceRow(
g_settings->getBool("enable_waving_water");
static thread_local const bool force_not_tiling =
- false && g_settings->getBool("enable_dynamic_shadows");
+ g_settings->getBool("enable_dynamic_shadows");
v3s16 p = startpos;
diff --git a/src/client/render/core.cpp b/src/client/render/core.cpp
index 44ef1c98c..f151832f3 100644
--- a/src/client/render/core.cpp
+++ b/src/client/render/core.cpp
@@ -36,7 +36,7 @@ RenderingCore::RenderingCore(IrrlichtDevice *_device, Client *_client, Hud *_hud
virtual_size = screensize;
if (g_settings->getBool("enable_shaders") &&
- false && g_settings->getBool("enable_dynamic_shadows")) {
+ g_settings->getBool("enable_dynamic_shadows")) {
shadow_renderer = new ShadowRenderer(device, client);
}
}
diff --git a/src/client/renderingengine.h b/src/client/renderingengine.h
index a0ddb0d9a..6f104bba9 100644
--- a/src/client/renderingengine.h
+++ b/src/client/renderingengine.h
@@ -123,8 +123,8 @@ public:
// FIXME: this is still global when it shouldn't be
static ShadowRenderer *get_shadow_renderer()
{
- //if (s_singleton && s_singleton->core)
- // return s_singleton->core->get_shadow_renderer();
+ if (s_singleton && s_singleton->core)
+ return s_singleton->core->get_shadow_renderer();
return nullptr;
}
static std::vector<irr::video::E_DRIVER_TYPE> getSupportedVideoDrivers();
diff --git a/src/client/shader.cpp b/src/client/shader.cpp
index c04a25862..dc9e9ae6d 100644
--- a/src/client/shader.cpp
+++ b/src/client/shader.cpp
@@ -733,7 +733,7 @@ ShaderInfo ShaderSource::generateShader(const std::string &name,
shaders_header << "#define FOG_START " << core::clamp(g_settings->getFloat("fog_start"), 0.0f, 0.99f) << "\n";
- if (false && g_settings->getBool("enable_dynamic_shadows")) {
+ if (g_settings->getBool("enable_dynamic_shadows")) {
shaders_header << "#define ENABLE_DYNAMIC_SHADOWS 1\n";
if (g_settings->getBool("shadow_map_color"))
shaders_header << "#define COLORED_SHADOWS 1\n";
diff --git a/src/client/sky.cpp b/src/client/sky.cpp
index 7fe90c6cd..0ab710eee 100644
--- a/src/client/sky.cpp
+++ b/src/client/sky.cpp
@@ -103,7 +103,7 @@ Sky::Sky(s32 id, RenderingEngine *rendering_engine, ITextureSource *tsrc, IShade
m_directional_colored_fog = g_settings->getBool("directional_colored_fog");
- if (false && g_settings->getBool("enable_dynamic_shadows")) {
+ if (g_settings->getBool("enable_dynamic_shadows")) {
float val = g_settings->getFloat("shadow_sky_body_orbit_tilt");
m_sky_body_orbit_tilt = rangelim(val, 0.0f, 60.0f);
}