aboutsummaryrefslogtreecommitdiff
path: root/src/client/mapblock_mesh.cpp
diff options
context:
space:
mode:
authorLiso <anlismon@gmail.com>2021-06-06 18:51:21 +0200
committerGitHub <noreply@github.com>2021-06-06 18:51:21 +0200
commitc47313db65f968559711ac1b505ef341a9872017 (patch)
tree63d9b1b2be512918e2361d96e4fb52ff1ec3f9de /src/client/mapblock_mesh.cpp
parent46f42e15c41cf4ab23c5ff4cd8a7d99d94d10d7b (diff)
downloadhax-minetest-server-c47313db65f968559711ac1b505ef341a9872017.tar.gz
hax-minetest-server-c47313db65f968559711ac1b505ef341a9872017.zip
Shadow mapping render pass (#11244)
Co-authored-by: x2048 <codeforsmile@gmail.com>
Diffstat (limited to 'src/client/mapblock_mesh.cpp')
-rw-r--r--src/client/mapblock_mesh.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp
index 72e68fe97..402217066 100644
--- a/src/client/mapblock_mesh.cpp
+++ b/src/client/mapblock_mesh.cpp
@@ -860,6 +860,9 @@ static void updateFastFaceRow(
g_settings->getBool("enable_shaders") &&
g_settings->getBool("enable_waving_water");
+ static thread_local const bool force_not_tiling =
+ g_settings->getBool("enable_dynamic_shadows");
+
v3s16 p = startpos;
u16 continuous_tiles_count = 1;
@@ -898,7 +901,8 @@ static void updateFastFaceRow(
waving,
next_tile);
- if (next_makes_face == makes_face
+ if (!force_not_tiling
+ && next_makes_face == makes_face
&& next_p_corrected == p_corrected + translate_dir
&& next_face_dir_corrected == face_dir_corrected
&& memcmp(next_lights, lights, sizeof(lights)) == 0