IT lexicon › Programming › Greedy meshing

Greedy meshing

Programming På svenska → Updated: 2026-10-24

An algorithm that collapses a voxel chunk's exposed faces into as few large rectangles as possible, slashing the triangle count a naive mesher would emit.

Naive voxel meshing emits two triangles per visible block face — a single chunk becomes millions of triangles, most of them flat and hidden. Greedy meshing walks each plane and grows rectangles as far as neighbouring cells share orientation and texture, greedily (hence the name) until they can grow no further. The result is the same silhouette with a fraction of the vertices and far fewer draw calls.

The technique was popularized around 2012 by Mikola Lysenko's write-up and became standard in Minecraft-style voxel engines. The trade-off: merged faces lose per-cell information, so per-voxel lighting or unique per-block textures get fiddly and you lean on a texture atlas. For smooth, rounded surfaces you reach for marching cubes instead.

← Back to the lexicon