aboutsummaryrefslogtreecommitdiff
path: root/src/client/wieldmesh.cpp
diff options
context:
space:
mode:
authorx2048 <codeforsmile@gmail.com>2023-01-31 17:30:59 +0100
committerGitHub <noreply@github.com>2023-01-31 17:30:59 +0100
commit69fc20610947610b7829f3bfad82e23ed705b764 (patch)
tree775cb27a4875a071fccddee87b80730e39ed9b14 /src/client/wieldmesh.cpp
parentcded6a3945206e51c35adbd063f1aec3a47e310f (diff)
downloadminetest-69fc20610947610b7829f3bfad82e23ed705b764.tar.xz
8x block meshes (#13133)
Reduce the number of drawcalls by generating a mesh per 8 blocks (2x2x2). Only blocks with even coordinates (lowest bit set to 0) will get a mesh. Note: This also removes the old 'loops' algorithm for building the draw list, because it produces visual artifacts and cannot be made compatible with the approach of having a mesh for every 8th block without hurting performance. Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com> Co-authored-by: Lars <larsh@apache.org> Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'src/client/wieldmesh.cpp')
-rw-r--r--src/client/wieldmesh.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/wieldmesh.cpp b/src/client/wieldmesh.cpp
index 155b5ecc4..5030ea575 100644
--- a/src/client/wieldmesh.cpp
+++ b/src/client/wieldmesh.cpp
@@ -318,7 +318,7 @@ static scene::SMesh *createSpecialNodeMesh(Client *client, MapNode n,
std::vector<ItemPartColor> *colors, const ContentFeatures &f)
{
MeshMakeData mesh_make_data(client, false);
- MeshCollector collector(v3f(0.0f * BS));
+ MeshCollector collector(v3f(0.0f * BS), v3f());
mesh_make_data.setSmoothLighting(false);
MapblockMeshGenerator gen(&mesh_make_data, &collector,
client->getSceneManager()->getMeshManipulator());