Skip to content

Software voxel renderer

A Minecraft world renderer built from scratch in pure C#

No GPU, no game engine, no NuGet. A hand-written software rasterizer meshes voxel chunks, shades every face with ambient occlusion and biome tints, draws a procedural sky and sun, then writes its own PNG. It generates terrain from value-noise, renders a hand-placed block showcase and the survival HUD, and loads a genuine Anvil (.mca) save by decoding level.dat and its NBT chunk sections.

9
scenes rendered
480×270
pixels per frame
0.89 s
8 frames + world-gen
0
NuGet packages
Procedural voxel terrain seen from above a green hilltop, sun glowing in a blue sky
Procedural terrain
Hilltop overhead

FBM value-noise carves a heightmap with per-column biomes; grass and dirt are tinted by biome, viewed from 18 blocks above the highest peak the generator found near origin.

Desert dunes of sand blocks rolling toward distant water under a bright sun
Procedural terrain
Desert ridge

Eye-level camera across a desert biome: the noise field drops sand instead of grass, with a sea flooded to sea level on the far side. Perspective projection plus a radial sky-to-horizon gradient.

A coastline where sand meets a large body of translucent water blocks beneath the sun
Procedural terrain
Coastline

Fifty blocks east of the peak, the terrain dips below sea level and floods. Water blocks are depth-sorted and blended translucent over the sand and stone behind them.

Hand-built scene: grass platform with a sunken water pool, an oak tree, and a small glass wall
Block showcase
Mixed blocks

A hand-placed diorama: grass-over-dirt-over-stone floor, a two-deep water pool, an oak-log-and-leaves tree, and a glass wall. The jungle biome tint pushes grass and leaves lush green.

A real Minecraft Anvil save rendered as green voxel hills with a tree and the sun overhead
Real .mca save
Anvil world (--world)

A genuine Anvil region loaded with --world: it gunzips level.dat, reads the spawn point (32, 64, 32), decodes the palette-packed NBT chunk sections from r.0.0.mca, and auto-frames the camera above spawn.

A flat stone world with the Minecraft survival HUD: hotbar, health and hunger bars, crosshair
Interface
Survival HUD

The same rasterizer composites the survival interface source-over the 3D frame: hotbar, health and hunger rows, XP counter and a centered crosshair, plus the glowing sun sprite.

An angled aerial view over a vast flat plate of stone blocks meeting a blue sky
Synthetic scene
Flat world, aerial

The built-in flat-world source: an infinite stone plate. An angled camera shows the greedy-meshed grid receding to the horizon, every voxel edge darkened by ambient occlusion.

Eye-level view across a flat stone plain to the horizon with the sun high in the sky
Synthetic scene
Flat world, horizon

The same plate at eye level. The perspective camera and depth buffer resolve thousands of block faces into a clean horizon line under the procedural sky gradient.

Straight-down nadir view onto a grid of stone block tops with speckled texture and dark seams
Synthetic scene
Nadir close-up

An 88-degree straight-down shot onto the block tops. Up close you can read the per-voxel stone texture and the ambient-occlusion darkening that thickens toward every seam.

How a frame is made

A block source answers "what voxel is at (x, y, z)?" - a flat plate, a value-noise generator, a hand-placed diorama, or a decoded Anvil save. A chunk mesher walks the blocks and emits only the faces that touch air, merging coplanar runs into fewer quads. Each vertex carries light, biome tint and ambient occlusion; a scanline rasterizer with a depth buffer fills the triangles, the sky and sun are drawn behind, the HUD over the top, and the finished pixels are packed into a self-written PNG. Every part - NBT parser, Anvil reader, 3D math, rasterizer, PNG encoder - is plain C# on the .NET base library alone.