Vector tunnel
1991Eighteen octagon rings on a winding path, joined by lines and brightening as they near, the wireframe ancestor.
u = atan(y, x) , v = 1 / r
1991 to today
Endless flight down a tube. It began as rings of dots and lines, became a texture painted from two lookup tables, and is now raymarched through real geometry. It never stopped being hypnotic.
The algorithm
For every screen pixel, compute the angle around the centre and the distance from it. The angle becomes the texture's u coordinate and the inverse of the distance becomes v, far away is the small centre, close by is the edge. Scroll v to fly, offset u to spin, darken with distance. Earlier tunnels instead projected rings of points or polygons along a winding path.
The old-hardware trick
atan and division per pixel were far too slow, so both were precomputed once into two tables. Make the tables twice the screen size and you can slide a screen-sized window over them to move the vanishing point, the whole frame then costs two table reads, two additions and a texture fetch per pixel.
// once
for y, x in 0..2h, 0..2w:
ANGLE[y][x] = atan2(y − h, x − w) · 128/π
DEPTH[y][x] = K / dist(x, y, w, h)
// per frame
for y, x in screen:
u = ANGLE[y+oy][x+ox] + spin
v = DEPTH[y+oy][x+ox] + fly
pixel = shade(texture[v & 255][u & 255], depth)Documented milestones, with a source for each. Famous examples, not claims of who did it first.
Milkracer / Alpha Flight + Zylon · Amiga OCS/ECS
An early documented tunnel production in the vector tradition, before the full-screen textured look.
SourceChannel 38 (Bluedevil's screen) · Atari ST
Depth conveyed by moving projected dots instead of a continuous textured wall.
SourceTrug / Future Crew · Second Reality · DOS
Second Reality's dot tunnel, credited separately and surviving as Pascal source, one of the most inspectable examples there is.
SourceSpite / Subspace · Toltec 9 · Amiga · 68030 / 50 MHz
Credits list a ‘360° Free Rotating Tunnel’ next to a water-displacement tunnel, beyond a simple fixed-axis fly-through.
SourceIñigo Quilez · Rare, Storm · Software rendering
Quilez links these demos to his lookup-table deformations: tunnels, flowers and other nonlinear warps from the same table trick.
SourceWsmind / TMP · Thought Process · Windows · shaders
Combined 4K winner at Very Important Party 2017: the screen-to-texture table replaced by geometry evaluated in a shader.
SourceKork / MAJESTiC · Parade · PC · software rendering
Parade, released at Evoke 2026 with no shaders at all, flies down a throat built from rings of merged blobs: an implicit field marched per pixel, then outlined, bloomed, glitched on the beat and smeared by feedback.
SourceIñigo Quilez · tunnel article · GLSL
On a GPU the atan seam breaks mipmapping derivatives; the article explains the fix, a problem nearest-neighbour DOS tunnels never had.
Source8 live versions, from the oldest platform to today: 6 on the CPU, 2 on the GPU. Retro versions run at their original resolution and palette. Demos pause when off screen.
Eighteen octagon rings on a winding path, joined by lines and brightening as they near, the wireframe ancestor.
Forty-eight rings of forty dots, each ring slightly twisted, swaying along a curve. Near dots grow to 2×2.
The classic: angle and 1/distance tables twice the screen size, an XOR texture, 32 fog levels and a wandering vanishing point.
Spinning fast and swinging wide, in a 256-colour palette from AGA's 24-bit range, the late-Amiga fly-through.
Same table trick, different formula: a five-petal radius turns the tube into a flower. One table, any warp.
MAJESTiC's Parade tunnel, software-rendered from the developer's notes: rings of merged Wyvill blobs marched per pixel, drawn as an over-driven white ink drawing of a corrugated throat over a hot magenta void, punching, swelling and tearing on every beat at 140 BPM, with noisy white bars slamming across during the acceleration.
atan and 1/r per pixel at full resolution, with anti-aliased grid lines from screen-space derivatives and a glowing core.
A real tube with ribs along a winding path, sphere-traced, lit by a light that flies ahead of you, sinking into fog.