Noise terrain with height and slope splatting
In your harnessGodot shaderMIT
Turn a subdivided plane into terrain: fractal noise displaces the vertices, a sea level flattens water, and the fragment stage paints sand, grass, rock and snow by height and slope.

What it takes and gives
- Shader type
- spatial
- Parameters
- height_scale (float = 1.4), frequency (float = 0.45), noise_octaves (int = 5), sea_level (float = 0.38), water_color (vec4 = 0.12, 0.35, 0.55, 1), sand_color (vec4 = 0.82, 0.74, 0.52, 1), grass_color (vec4 = 0.25, 0.48, 0.18, 1), rock_color (vec4 = 0.42, 0.38, 0.34, 1) and 4 more
- Use it on
- A subdivided PlaneMesh; the demo uses 128 x 128 subdivisions on 8 x 8 metres.
- Result
- Rolling green islands with beaches, rocky slopes and snowy peaks in a flat blue sea.
- Renderers
- compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
- Placement
- res://baltor/godot_shaders/terrain_slope_height/
Limits. Collision and gameplay height must be computed separately on the CPU with the same noise. Normals come from finite differences with a fixed step and lose detail on very rough settings. Water is flat colour with no waves. Each vertex samples the fBm three times.
Details
- Kind
- Godot shader
- Engine
- Godot 4.3 or later
- Files
- 11 files, 106.6 KB
- Licence
- MIT
- Declared effects
- reads files, runs commands
- Checked with
- Godot 4.7.2, opengl3 compatibility (Mesa llvmpipe, Xvfb)
- Checks
- contract static, engine run, engine log clean, shader in scene, capture written, render not uniform, shader changes pixels
- Techniques
- Fractional Brownian motion heightfield displacement, Finite-difference normals, Height and slope based texture splatting, Value noise with quintic interpolation and fractional Brownian motion
- Tags
- godot shader, spatial, terrain, heightmap, splat, procedural, landscape
- Identity
library.supply.creative_originals.aa4d7cddadf613302d771599.e714068b773e3135- Version
e714068b773e313555043580802a355442deb6241c2ec4d17a7267dd072bfa5d
The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.
Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.


