TL;DR: https://procedural-planets.vercel.app/
Hello, I want to share my recent personal project, a procedural planet mesh generator. Unlike the other implementation, mine uses compute shaders to calculate vertex positions based on the parameters. So, the generated planet can be exported to .obj
.
CPU Implementation
In the beginning I naively tried to create the mesh on the CPU which is pretty laggy especially if the resolution is high (waited around 12 secs at resolution 360). At this point, I encountered with compute shaders which is what I was looking for. However, since WebGPU is not widely supported, I decided not to use it.
Fake Compute Shaders
At this point, I noticed my fragment shaders are already doing highly parallel computations. So, I mapped the pixel value to vertex height in my mesh. This immediately sped thing up and my project is usable now.
Github: GitHub - XenoverseUp/procedural-planets: A procedural planet generation tool written in WebGL, ThreeJS. It uses multiple layered Simplex noise to generate terrain.
Live Demo: https://procedural-planets.vercel.app/
Let me know if you have a feedback or noticed an improvement.
Thanks for reading.