Add a World that stores chunks in a Dictionary keyed by chunk coordinate, with floor-division world<->chunk coordinate mapping (correct for negative coords). The mesher takes an optional neighbor sampler so faces at chunk borders are culled against adjacent chunks instead of always meshing the shell. Render one ChunkRenderer per chunk, placed via the model matrix. Reorganize the World layer into Blocks/ and Chunk/ sub-namespaces.
12 lines
171 B
C#
12 lines
171 B
C#
namespace VoxelEngine.World.Blocks;
|
|
|
|
public enum BlockFace
|
|
{
|
|
Top, // +Y
|
|
Bottom, // -Y
|
|
North, // -Z
|
|
South, // +Z
|
|
East, // +X
|
|
West // -X
|
|
}
|