Drifting 2D clouds with self-shading
In your harnessGodot shaderMIT
Draw a sky with drifting clouds from fractional Brownian motion: a coverage threshold shapes the clouds, a second lookup toward the sun shades their undersides, and the sky behind follows a vertical gradient.

What it takes and gives
- Shader type
- canvas_item
- Parameters
- sky_top (vec4 = 0.25, 0.5, 0.88, 1), sky_bottom (vec4 = 0.7, 0.85, 0.98, 1), cloud_light (vec4 = 1, 1, 1, 1), cloud_shadow (vec4 = 0.55, 0.6, 0.72, 1), coverage (float = 0.5), softness (float = 0.15), scale (float = 3), wind_speed (float = 0.03) and 2 more
- Use it on
- A ColorRect (or any CanvasItem) sized to the area to fill; UVs span 0 to 1 across it.
- Result
- A blue sky gradient with white puffy clouds shaded grey on one side.
- Renderers
- compatibility: compiled and rendered, forward plus: not verified, mobile: not verified
- Placement
- res://baltor/godot_shaders/clouds_fbm_2d/
Limits. One shading step, not light marching, so thick clouds lack depth. Clouds repeat with no structure at very large scales.
Details
- Kind
- Godot shader
- Engine
- Godot 4.3 or later
- Files
- 11 files, 107.5 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 density with coverage threshold, Offset-sample self-shadowing, Value noise with quintic interpolation and fractional Brownian motion
- Tags
- godot shader, canvas item, clouds, sky, fbm, background, procedural
- Identity
library.supply.creative_originals.37af517ebd1e23cced60fc6a.6ac2302ff80982de- Version
6ac2302ff80982deedd080da58c6277db97820d945da3c3faf5488231cd28686
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.
