Experimenting with terrain generation and Metal. Currently a macOS app with the ability to generate infinite (theoretically) procedural terrain with Simplex noise. All generation done on GPU using Metal. Allows for zooming, panning with mouse or keyboard, and tweaking generation params live via a config sidebar.
The terrain generator uses both a heightmap generated via configurable octaves of Simplex noise, and a smaller-scale moisture map generated via the same. All of it is calculated on the GPU itself. They're mixed together and compared to ~16 built in biomes to see what color the tile should appear. These biomes have both moisture and elevation ranges to make this happen. Sea level & overall aridity are configurable via global params too, as is distribution ("sharpness") of the noise ranges, i.e. how quickly they range from 0-1, useful for creating spikier peaks and flatter valleys or temperature extremes.
There are presets available, and you can quickly save more of your own/load them from other sources (they're just json files).
The grid generator is a CPU-heavy debugging tool that generates random noise on the CPU and passes a ton of float data to the GPU. Useful for debugging chunk loading/paging/padding and zooming/other user interaction. Uses colors from the biomes in terrain generation
- Blending of colors, random variation to create more realistic variety
- Trees!
- Optimized triple buffering/smarter rendering (maybe?)
- User avatar visualized on map
- Making more of a game out of it