d1c8c22705ae5d9908352b93dce74251eef0dc73
Pure-air chunks (above terrain) and chunks where every face culls produce a zero-length mesh from ChunkMesher.Build(). Previously InstallResult still allocated a real ChunkRenderer (VBO + VAO) and registered a zero-vertex draw call. With RenderDistanceVertical=2 and a player at surface Y, the topmost vertical layer is typically all pure air -- roughly H*H = ~289 wasted renderers per spawn. The chunk still gets added to _ready so SpawnReady, dirty-marking and unload bookkeeping continue to work; DrawAll's iteration over the renderer dictionary naturally skips entries that don't exist.
VoxelEngine
A learning voxel engine written in C# (.NET 10) on top of OpenTK 4 / OpenGL 3.3.
Status
Early baseline. The current goal is rendering a single face-culled, textured 16×16×16 chunk that you can fly around with a free camera — the structural core the rest of the engine builds on.
Tech stack
- .NET 10 / C#
- OpenTK 4.9.4 — windowing, OpenGL bindings, and math
- StbImageSharp — texture (PNG) loading
Build & run
Requires the .NET 10 SDK.
dotnet run --project VoxelEngine.csproj
Once the baseline is running: WASD to move, mouse to look, Esc to quit.
Project layout
Core/ game window + loop
Rendering/ shader, texture, camera, chunk renderer (OpenGL)
World/ block model, registry, chunk, mesher (no OpenGL)
Assets/ shaders + texture atlas
The World/ layer is intentionally free of any OpenGL dependency so the voxel logic can
be unit-tested headless.
Roadmap
- Baseline: window, fly-camera, one face-culled textured chunk
- Procedural terrain (noise)
- Multiple chunks + frustum culling
- Player controller + AABB collision
- Block break / place
- Lighting
Description
Languages
C#
97.9%
GLSL
2.1%