This week in YUMA marked a shift from experimentation to building-something-actually-useable. I’ve been digging deep into the core terrain system, refining the noise algorithms, and optimizing how the engine handles the transition from random numbers, generated by the GPU to a rendered world, which was a journey.
Refining the Noise: From Randomness to Geology#
It started with basic noise functions, but “random” doesn’t mean “natural.” I moved beyond simple Perlin and Simplex layers, focusing on combining specific octaves to simulate realistic terrain features.

The goal was to create a noise pipeline that feels purposeful. By tweaking frequency and amplitude and applying Domain Warping (turbulence) mountains now rise with jagged peaks, while valleys smooth out naturally. I’ve laid the groundwork for a more hydraulic-looking flow, even before implementing actual erosion simulations. It’s starting to look like geography or some weird abstract-art stuff.

Marching Cubes: Optimizing the Mesh#
The transition from voxel data to smooth geometry is handled by the Marching Cubes algorithm. While seeing the world turn from blocks to smooth surfaces is always satisfying, the real battle this week was performance and continuity.
Generating a mesh is easy; generating it fast enough for an infinite world is hard. I spent a lot of time optimizing the mesh generation pipeline:
- Chunk Management: Restructuring how chunks are cached and updated to prevent stuttering.
- Normal Calculation: Moving away from flat shading to smooth, computed vertex normals that make lighting interact correctly with the curves of the terrain.
- Seam Stitching: Ensuring there are no visible gaps between chunks when the LOD (Level of Detail) changes.
The result is a mesh that feels massive but retains the intricate details needed for close-up gameplay.

The Shader Playground: Solving the “Tiling” Problem#
With the geometry stabilized, I shifted focus to the visual layer. Writing custom HLSL shaders was critical here. Standard UV mapping doesn’t work well on procedural voxels textures stretch on cliffs or repeat obviously on flat plains.

To solve this, I implemented Triplanar Mapping combined with Stochastic Sampling, although im not very confident that everything is implemented 100% correct, it does somehow look good…
- Triplanar Mapping projects textures from three axes, ensuring cliffs look like cliffs and grass looks like grass, regardless of the geometry’s angle.
- Stochastic Blending was the gamechanger for realism. It randomizes the texture lookup slightly to break up repetitive patterns.

Now, instead of seeing a repeating grid of grass textures, the ground looks like a continuous, organic surface. I also added logic to blend layers based on slope automatically applying rock textures to steep angles and moss/grass to flat areas without manual painting. The Blending of diffenrent materials is not tackled yet, thats a quest for another day.
Why This Matters#
Texturing a voxel landscape is deceptively hard. It’s easy to make it look like a repetitive video game but it’s hard to make it look like a place. By combining runtime noise masks with these advanced shader techniques, I’ve managed to create transitions that feel organic.

The engine isn’t just rendering random junk anymore, it’s synthesizing a believable environment in real-time almost fully on the GPU (which was a pain, but a worth one)

Next Steps#
- LOD Refinement: Pushing the draw distance further without melting the GPU or CPU.
- Biome Logic: Using temperature and humidity maps to dynamically change vegetation (or better, have vegetation at all…)


