Visualizations
053 / 500

053 · Retro

Wobbly Polygons

A 1990s console renderer that builds every famous glitch on purpose, toggle by toggle.

A software rasterizer draws a little jungle temple at dusk the way a mid 1990s console did: vertices snapped to whole pixels with no subpixel precision, textures interpolated affinely in screen space without the divide by depth, no depth buffer at all (triangles go into a 1,024 bucket ordering table and are painted far to near), 15 bit color with a 4x4 ordered Bayer dither, and a 240 line frame scaled up with hard pixels. Lighting is per vertex Gouraud shading with warm flickering torches and depth cued fog, and every texture is a 32 by 32 tile painted in code, with a color key for the palm fronds and flames. The compare view runs a second, modern path beside it on the same triangles: perspective correct texturing, bilinear filtering, a z-buffer, 24 bit color and higher resolution.

Try it. Toggle each artifact with the buttons or keys 1 to 5 to see exactly what it does. Press C (or Compare) for the side by side view and drag the divider. Drag to look around and fly with WASD, Q and E for down and up and Shift to go faster; let go and the camera tour resumes.

  • Affine texture mapping
  • Vertex snapping
  • Ordering table
  • Ordered dithering
  • Gouraud shading
  • Near plane clipping

View the source · one module, plus a small shared runtime for sizing, the animation loop and input

Build your own

Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.

Build a tiny software 3D renderer that recreates the wobbly look of mid 1990s console games, using JavaScript and the HTML canvas element. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.

Start simple:
- Render into a 320x240 ImageData buffer and draw it scaled up to the window with imageSmoothingEnabled set to false, so pixels stay hard and square.
- Paint a few 32x32 textures in code (stone bricks, grass, water) as arrays of colors.
- Build a small scene from textured quads: a stepped temple of boxes on a flat island with water around it. Give every vertex texture coordinates.
- Write a camera that orbits the temple, project each vertex with a perspective divide, and rasterize triangles with barycentric edge functions, sampling the texture with nearest neighbor lookups.
- Do it the console way on purpose: round projected vertices to whole pixels, interpolate the texture coordinates linearly in screen space (no divide by depth), and skip the z-buffer by sorting triangles by average depth and drawing far to near.

Once that works, make it beautiful:
- Add per vertex lighting from a low orange sun plus a couple of flickering torches, and fog that fades distant vertices toward the sky color.
- Quantize output to 5 bits per channel with a 4x4 ordered Bayer dither.
- Add keys that toggle each artifact (snapping, affine textures, depth sorting, dithering) so you can see what each one does, and a mode with perspective correct texturing and a z-buffer to compare.

Explain the key ideas in short code comments. When you're done, tell me how to open it and suggest three directions I could take it next, such as color keyed transparency for leaves, a side by side split view, or a slowly scrolling water texture.
PreviousMetachronal WalkerA millipede and a centipede ripple across a sketchbook page on waves of legs. NextOptimizer Topo RaceSGD, Adam, Lion and friends race downhill across a vintage topographic map.

Related visualizations

  • Dither LabRetro Seven dithering algorithms race on a moving scene in 1-bit, handheld green, CGA and EGA.
  • Mode 7 TrackRetro The per-scanline floor trick of 16-bit kart racers, with a debug view of every row.
  • Palette CyclingRetro A waterfall, harbor rain and an aurora, animated without changing a single pixel.
  • Pseudo 3D RoadRetro A sunset coastal highway faked the 80s arcade way, from flat segments and sprites.
  • Sprite StackingRetro A cozy pixel town where every house, car and tree is a pile of flat slices.
  • RaycasterRetro A Wolfenstein-style 3D maze drawn one column at a time.
  • Sector EngineRetro A 2.5D portal engine in the mid-90s style: a slow walk round a castle at golden hour.
  • Glenz VectorsRetro Nested glassy checkered polyhedra bounce on a glossy floor, then shatter and rebuild.
  • Voxel SpaceRetro Fly low over a mountain valley with the 1992 Comanche terrain trick.

Use ← and → to move between demos. While the canvas has focus, keys go to the demo instead.

← More from Emergent Mind Labs