Creation
A classic demoscene shader: a unit grid pushed outward by a breathing ring wave, read as a glowing distance field, with time animating.
Creation is one of the most viewed fragment shaders on Shadertoy, and one of the shortest: a dozen lines that turn a plain unit grid into a glowing, breathing tunnel of light. This document is a port of it. The shader works on the unit square (p, q) of texture coordinates. Every point is pushed away from the center along its own radius by the factor g = (\sin(T + 0.14) + 1)\,|\sin(9d - 2T - 0.28)| / d , where d is the distance to the center and T the time. The first factor breathes between 0 and 2 ; the second is a rectified sine with a ring every \pi/9 \approx 0.35 units of radius, and those rings travel outward as T grows. The push has the same length at every point: dividing by d only turns (x, y) into a unit direction along the radius.
After the push, the shader measures the distance from (p, q) to the nearest cell center of the unit grid, \operatorname{mod}(p, 1) - 0.5 and likewise for q , and takes c = 0.01 over that distance. The reciprocal makes each cell center a point of light, and the radial push smears those points into the streaks and ribbons of the picture. The brightness is finally divided by d once more, so the center glows and the corners fade. In the original the three color channels are the same field at three times 0.07 apart, which gives the edges their chromatic fringes; the heatmap keeps the middle channel on [0, 1] through a dark-to-cyan palette. The time T advances at one unit per second, as in the original.
Credit: the original shader is “Creation” by Danilo Guanabara (Silexars), published on Shadertoy as XsXXDn.
JavaScript is required to view the interactive plot.