Twenty-one looks share one full-screen triangle. A fragment shader calculates the colour of each pixel. Galaxies is the exception in one way: the page simulates six small spirals, and the shader draws wherever those centres currently are. They attract, spin, get flung apart, and the sky restarts.
Liquid Silk
Six layers of smooth noise form a richer pattern. Feeding that pattern back into its own coordinates bends it into folds: this is called domain warping. Sine waves add ribbons and travelling highlights.
Try it: lower Distortion for smoother folds, then raise it to twist the flow.
Aurora
Three offset layers of warped coordinates form overlapping luminous curtains with fine filaments. Sine waves shape the bands, while green, teal and violet light blend over a dark sky.
Try it: slow the motion and increase Pattern scale to change the spacing of the curtains.
Ripple Glass
The distance from the centre forms circular waves. Noise and a second crossing wave distort those rings into a watery surface.
Try it: set Distortion to zero for clean rings, then increase it to break up their symmetry.
Ember
Noise becomes coals, and a slow pulse brightens the centre. Distortion pulls the coals apart; density packs more of them into the frame.
Starfield
A grid of points, most of them dark, a few of them stars. They twinkle on their own clock. Density changes how many stars cross the screen.
Surprise me and drift
Surprise me picks a look, a palette, and slider values, and leaves the pointer effect off. Let it drift wanders distortion, scale, and brightness around the current settings. Copy this look puts those settings in the address bar and on the clipboard.
From your pointer to the GPU
- Pointer coordinates are normalized to the canvas.
- Motion speed advances an accumulated clock; pause freezes that clock.
- Scale and distortion change the shader's sampling coordinates.
- A local pointer ripple bends the pattern around your cursor.
- The GPU colours the full-screen triangle for the next frame.
Colours and editable defaults
The configuration file lists the initial values, explains their units, and defines the hex-code palettes. Pointer influence starts at zero and Reset keeps it off. Original preserves the built-in colours; custom palettes map the light pattern through your background, primary, and accent colours. Choose warm, cool, full-spectrum, or monochrome colours, or retain the original palette. Pattern density adds detail without changing animation speed. Each effect has its own zoom and density defaults. Brightness and contrast adjust the final output.
The actual source
These are the files running this demo, including their comments. Expand a file to read it or save a copy.
Configuration — defaults, hex colours, and presets
Save configuration source ↓Open to load source.
Shaders — all twenty-one background effects
Save shader source ↓Open to load source.
Renderer — animation, controls, and lifecycle
Save renderer source ↓Open to load source.