Skip to main content
Futuristic liquid metal material applied to uploaded logos or abstract shapes. Creates fluid motion with animated stripe patterns that distort along shape edges, perfect for sci-fi and modern aesthetics.

Features

  • Animated metallic stripe patterns
  • Chromatic aberration (RGB shift)
  • Edge-aware distortion
  • Multiple predefined shapes (when no image)
  • Customizable color tinting
  • Softness and blur controls
  • Image preprocessing for optimal results

Basic Usage

Parameters

Visual Parameters

string | HTMLImageElement
default:"''"
Source image/logo to apply the liquid metal effect to. Leave empty to use predefined shapes. The image will be preprocessed automatically in React.
string
default:"'#AAAAAC'"
Background color in hex, rgb, or rgba format
string
default:"'#ffffff'"
Overlay color tint in hex, rgb, or rgba format (uses color burn blending)
number
default:"2.0"
Density of pattern stripes
number
default:"0.3"
Red channel chromatic aberration/dispersion
number
default:"0.3"
Blue channel chromatic aberration/dispersion
number
default:"0.4"
Strength of distortion on the shape edges
number
default:"0.1"
Color transition sharpness (0 = hard edge, 1 = smooth gradient)
number
default:"0.07"
Noise distortion over the stripe pattern
number
default:"70"
Direction of pattern animation in degrees
'none' | 'circle' | 'daisy' | 'diamond' | 'metaballs'
default:"'diamond'"
Predefined shape when no image is provided:
  • none: Fill entire canvas
  • circle: Simple circle
  • daisy: Flower-like shape
  • diamond: Diamond/rhombus shape
  • metaballs: Animated organic blobs
boolean
default:"false"
(React only) Suspends the component when the image is being processed. Useful with React Suspense.

Sizing Parameters

'none' | 'contain' | 'cover'
default:"'contain'"
How to fit the shader into the canvas dimensions
number
default:"0.6"
Overall zoom level of the graphics
number
default:"0"
Overall rotation angle in degrees
number
default:"0"
Horizontal offset of the graphics center
number
default:"0"
Vertical offset of the graphics center

Animation Parameters

number
default:"1"
Animation speed multiplier
number
default:"0"
Manual frame control for animation

Presets

The LiquidMetal shader comes with several built-in presets:
  • Default: Classic liquid metal with chromatic aberration
  • Noir: Black and white with high softness
  • Backdrop: Full-screen canvas fill effect
  • Stripes: High repetition with strong color shifts

Examples

Classic Metal

Black and White

Rainbow Stripes

Full Screen Background

Image Preprocessing

React (Automatic)

In React, image preprocessing happens automatically:
Set suspendWhenProcessingImage to true to use React Suspense during processing.

Vanilla JavaScript (Manual)

For vanilla JavaScript, you must preprocess images manually:

What Preprocessing Does

The preprocessing function:
  1. Detects shape edges using Poisson equation
  2. Creates distance gradient from edges
  3. Optimizes for performance (512×512 working size)
  4. Stores gradient in red channel, alpha in green channel
This allows the shader to create edge-aware distortions efficiently.

Technical Details

Shader Uniforms (Vanilla JS)

When using the vanilla JavaScript API:

Shape Types

  • none (0): Fill entire canvas
  • circle (1): Simple circle
  • daisy (2): Flower pattern (animated)
  • diamond (3): Rotated diamond
  • metaballs (4): Animated organic blobs

Animation

The shader animates:
  • Flowing stripe patterns
  • Metaballs movement (when using metaballs shape)
  • Daisy rotation (when using daisy shape)
  • Edge distortions

Chromatic Aberration

The shiftRed and shiftBlue parameters create:
  • RGB channel separation
  • Rainbow edge effects
  • Prism-like color dispersion
  • More visible at shape edges and with higher contour

Performance Notes

  • Animated shader with continuous rendering
  • Image preprocessing uses Poisson solver (~100-500ms)
  • Preprocessing optimized to 512×512 working resolution
  • Runtime performance is excellent after preprocessing
  • Predefined shapes have no preprocessing overhead
  • Best with logo/icon images rather than photos