aboutsummaryrefslogtreecommitdiff
path: root/src/client/mapblock_mesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/mapblock_mesh.cpp')
-rw-r--r--src/client/mapblock_mesh.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp
index 167e1e3ec..249a56087 100644
--- a/src/client/mapblock_mesh.cpp
+++ b/src/client/mapblock_mesh.cpp
@@ -407,20 +407,20 @@ static void getNodeTextureCoords(v3f base, const v3f &scale, const v3s16 &dir, f
if (dir.X > 0 || dir.Y != 0 || dir.Z < 0)
base -= scale;
if (dir == v3s16(0,0,1)) {
- *u = -base.X - 1;
- *v = -base.Y - 1;
+ *u = -base.X;
+ *v = -base.Y;
} else if (dir == v3s16(0,0,-1)) {
*u = base.X + 1;
- *v = -base.Y - 2;
+ *v = -base.Y - 1;
} else if (dir == v3s16(1,0,0)) {
*u = base.Z + 1;
- *v = -base.Y - 2;
- } else if (dir == v3s16(-1,0,0)) {
- *u = -base.Z - 1;
*v = -base.Y - 1;
+ } else if (dir == v3s16(-1,0,0)) {
+ *u = -base.Z;
+ *v = -base.Y;
} else if (dir == v3s16(0,1,0)) {
*u = base.X + 1;
- *v = -base.Z - 2;
+ *v = -base.Z - 1;
} else if (dir == v3s16(0,-1,0)) {
*u = base.X + 1;
*v = base.Z + 1;
@@ -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 =
+ false && 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
@@ -1072,8 +1076,8 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset):
*/
{
- MapblockMeshGenerator generator(data, &collector);
- generator.generate();
+ MapblockMeshGenerator(data, &collector,
+ data->m_client->getSceneManager()->getMeshManipulator()).generate();
}
/*