]> git.lizzy.rs Git - minetest.git/commit
8x block meshes (#13133)
authorx2048 <codeforsmile@gmail.com>
Tue, 31 Jan 2023 16:30:59 +0000 (17:30 +0100)
committerGitHub <noreply@github.com>
Tue, 31 Jan 2023 16:30:59 +0000 (17:30 +0100)
commit69fc20610947610b7829f3bfad82e23ed705b764
tree775cb27a4875a071fccddee87b80730e39ed9b14
parentcded6a3945206e51c35adbd063f1aec3a47e310f
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>
14 files changed:
src/client/client.cpp
src/client/clientmap.cpp
src/client/clientmap.h
src/client/content_mapblock.cpp
src/client/mapblock_mesh.cpp
src/client/mapblock_mesh.h
src/client/mesh_generator_thread.cpp
src/client/mesh_generator_thread.h
src/client/meshgen/collector.cpp
src/client/meshgen/collector.h
src/client/wieldmesh.cpp
src/map.cpp
src/util/directiontables.cpp
src/util/directiontables.h