TypologySienna Chen
LookMiddleweight

ASCII, halftone & dithering

The image rebuilt from letters, dots or a few colors.

Rebuilding the image out of something coarser: letters, dots, or only a few colors in a pattern. Each has a strong reference (terminals, newsprint, old Macs). All three are a few lines of shader code and cost almost nothing.

Breaks when
DOM-based ASCII is heavy; do it in a shader instead
Also called
AsciiEffect, halftone pass, Bayer dither, ditherpunk

Prompts

ASCII in a shader
A full-screen ShaderPass that renders the Three.js scene as ASCII: 8 × 12 px cells, luminance per cell, ten glyphs (" .:-=+*#%@") from a bitmap font baked into a 5 × 7 bit table in the shader, ink on paper. Pointer proximity switches cells to the original pixels within a 120 px radius so people can see the source. No DOM text.
Halftone that follows form
A halftone pass with a dot grid rotated 22°, cell 7 px, dot radius from sqrt(1 − luminance), anti-aliased with smoothstep. Add a second grid at 45° in a second color for a two-ink print look. Explain why the rotation matters (moiré).
Bayer dither to a palette
Dither a rendered scene to a 4-color palette (paper, ink, and two mid tones) using an 8×8 Bayer matrix, at a fixed virtual resolution of 320 × 200 upscaled with nearest filtering so pixels are crisp on retina. Animate nothing but the scene; the dither pattern must stay locked to the pixel grid.

Related

Resources · 6

  • halftone-animationA Canvas 2D halftone dot field: shockwave intro, carrier blobs, SDF shapes in dots, cursor ripples, a dial for every constant. MIT.atom63GitHub · code · demoOct 4, 2026
  • halftone.atom63.ioThe live demo. Open the dial at the bottom right and push every slider; Replay restarts the intro.atom63site · demoOct 4, 2026
  • three.js example: TSL halftoneHalftone as the lighting itself: screen-space dots sized by the light, in a few nodes.mrdoobsite · code · demoOct 4, 2026
  • three.js example: ASCII effectDOM-based; fine for one object, not a full scene.mrdoobsite · code · demoJul 28, 2026
  • DitherpunkBayer and error-diffusion dithering explained with images.DasSurmasite · codeJul 26, 2026
  • three.js example: RGB halftonemrdoobsite · code · demoMar 22, 2026