This version
Not voxels, for contrast: this is how Elevated-style terrain works. Noise with analytic derivatives that damp the higher octaves on slopes, eroded-looking ridges, raymarched per pixel with sun, snow and aerial perspective.
How this version works
This fragment shader runs at a render scale of 0.6 and generates continuous terrain from layered value noise rather than a stored height map. Accumulated noise derivatives reduce contributions on steep slopes, while seven low-detail samples smooth the camera's height along its route. Each pixel marches a ray for up to 160 steps against six-octave terrain, followed by six interval-refinement steps when a hit is detected. Seven-octave height differences estimate the surface normal, and slope and altitude blend rock, grass and snow. Directional sunlight, a warm sky glow and exponential distance haze provide the final shading.
The trick in this version
The GPU evaluates terrain and lighting independently for each fragment, with fewer noise octaves used for camera placement than for surface normals. This is height-field raymarching, not voxel traversal, and it needs neither the CPU versions' map buffers nor their column horizons.
Historical context · GPU
2017 · Sebastian Macke
Voxel Space, explained in the browser
The terrain renderer reduced to a short, inspectable algorithm, with front-to-back drawing and y-buffer occlusion explained.
- Platform
- GPU · for contrast
- Era
- GPU
- Rendered on
- GPU
- Tags
- fbm · raymarching