Procedural planets

Unity C# HLSL

— DATE

November 2024


— TOOLS

Unity, HLSL


— LINKS

-> GitHub

A procedural planet generator done in Unity, exploring compute shaders for parallel computations, and Unity’s custom editor features.


Currently, users can specify the size of continents, look and depth of oceans, height and steepness of mountains, as well as the colors to apply to these elements. Planets are generated in-editor, in real-time.

We generate a sphere with uniformly distributed vertices. Layered simplex and ridge noises are then used to create mountains, oceans, and plains.


By taking a vertice’s normal and distance from the center, we can color the planet based on altitude and steepness.


The entire process happens in the editor, using shaders to calculate the various heights and colors in parallel. Utilizing Unity’s custom editor feature, I can call to recalculate new planets live, with every change, without ever pressing play.

Meant to imitate planet earth, using relatively small mountain eleveations and sharpness but high frequency to simulate scale.

Inspired from my Moai drawings, with smooth mountains and purple tones.

Some sort of inferno planet, with no oceans and incredibly sharp mountains (applies an exponent to their altitude)

A desert planet. This is what happens with low detail. Detail refers to the amount of ridge noises we layer to create texture. Low amounts result in smooth and clear ridge noise, resembling sand dunes.

using a low continent size, oceans resemble a multitude of tiny craters. using large but smooth mountains we create a bumpy looking meteoroide.

combines previous technique to create a relatively smooth ice planet, with the little mountains present given enough sharpness to stand out.