Skip to main content
The Mesh Gradient shader creates a flowing composition of color spots that move along distinct trajectories and are transformed by organic distortion. It supports up to 10 colors and provides controls for distortion, swirl effects, and grain overlays.

Usage

Parameters

string[]
default:"['#e0eaff', '#241d9a', '#f75092', '#9f50d3']"
Array of color hex strings for the gradient spots. Supports up to 10 colors. Each color creates a moving spot that blends with others.
number
default:"0.8"
Power of organic noise distortion applied to the gradient (0 to 1). Higher values create more wavy, organic movement.
number
default:"0.1"
Power of vortex distortion effect (0 to 1). Creates a rotational swirl around the center of the gradient.
number
default:"0"
Strength of grain distortion applied to shape edges (0 to 1). Adds texture to the boundaries between color spots.
number
default:"0"
Post-processing black/white grain overlay strength (0 to 1). Adds a film grain effect over the entire gradient.
number
default:"1"
Animation speed multiplier. Set to 0 to pause animation and use manual frame control.
number
default:"0"
Manual frame counter for when speed is 0. Useful for scrubbing through the animation.

Common Sizing Parameters

'none' | 'contain' | 'cover'
default:"'cover'"
How to fit the shader into the canvas dimensions.
number
default:"1"
Overall zoom level of the graphics (0.01 to 4).
number
default:"0"
Overall rotation angle in degrees (0 to 360).
number
default:"0"
Horizontal offset of the graphics center (-1 to 1).
number
default:"0"
Vertical offset of the graphics center (-1 to 1).
number
default:"0.5"
Reference point for positioning world width in the canvas (0 to 1).
number
default:"0.5"
Reference point for positioning world height in the canvas (0 to 1).

Presets

The component comes with several built-in presets:

Default

Ink

Purple

Beach

Technical Details

  • Max Colors: 10
  • Animation: Continuous flowing motion of color spots
  • Performance: Optimized for real-time rendering
  • Coordinates: Uses object UV coordinates with sizing transforms
The shader calculates positions for each color spot using procedural functions, applies noise-based distortion and vortex rotation, then blends colors using inverse distance weighting for smooth transitions.