Skip to main content
The Perlin Noise shader implements the classic 3D Perlin noise algorithm with full control over octaves, persistence, and lacunarity. Perfect for creating natural, flowing patterns like water, clouds, marble, or organic textures.

Usage

Parameters

string
default:"'#fccff7'"
Foreground color in hex format. Appears in the bright areas of the noise pattern.
string
default:"'#632ad5'"
Background color in hex format. Appears in the dark areas of the noise pattern.
number
default:"0.35"
Blend point between 2 colors (0 to 1). 0.5 = equal distribution, lower values show more foreground, higher values show more background.
number
default:"0.1"
Color transition sharpness (0 to 1). 0 = hard edge between colors, 1 = smooth gradient transition.
number
default:"1"
Number of noise octaves (1 to 8). More octaves create more detailed patterns but impact performance. Each octave adds a layer of detail.
number
default:"1"
Roughness and falloff between octaves (0.3 to 1). Lower values make higher octaves contribute less, creating smoother patterns. Higher values retain more detail.
number
default:"1.5"
Frequency step between octaves (1.5 to 10). Defines how compressed the pattern is. Higher values create more compressed, intricate patterns.
number
default:"0.5"
Animation speed multiplier. Controls how fast the noise evolves through the third dimension (time).

Common Sizing Parameters

'none' | 'contain' | 'cover'
default:"'cover'"
How to fit the shader into the canvas dimensions.
number
default:"1"
Overall zoom level (0.01 to 4). Affects the size of noise features.
number
default:"0"
Rotation angle in degrees (0 to 360).
number
default:"0"
Horizontal offset (-1 to 1).
number
default:"0"
Vertical offset (-1 to 1).

Presets

Default

Nintendo Water

Moss

Worms

Technical Details

  • Algorithm: Classic 3D Perlin noise with gradient interpolation
  • Gradients: 12 predefined gradient vectors for consistent results
  • Interpolation: Fade function using 6t⁵ - 15t⁴ + 10t³
  • Octaves: Fractal Brownian Motion (FBM) with configurable layers
  • Coordinates: Uses pattern UV coordinates scaled by 0.5
  • Anti-aliasing: Uses fwidth for smooth color transitions
  • Original Algorithm: Based on NlSGDz shader
The shader generates 3D Perlin noise by:
  1. Computing gradient vectors at the corners of a 3D grid cell
  2. Interpolating using the fade function for smooth transitions
  3. Optionally layering multiple octaves with decreasing amplitude and increasing frequency
  4. Normalizing the result and mapping to two colors with configurable sharpness