Pixelate

The Pixelate shader downsamples the canvas image into a mosaic of larger square blocks, creating a retro pixel-art or censorship effect. It uses nearest-neighbor sampling for crisp, hard-edged blocks.

Parameters

Pixel Size

RangeDefaultStep
1–10031

The size of each mosaic block in pixels.

ValueEffect
1No effect — original resolution
2–4Subtle reduction, retro feel
5–15Clearly pixelated, individual blocks visible
16–50Heavy mosaic, abstract patterns emerge
50–100Extreme — very few color blocks remain
Info

The default pixel size of 3 provides a subtle retro aesthetic that complements ASCII art without overwhelming the character detail.

Keyframing

Pixel size supports numeric interpolation:

  • Animate from 1 to large for a pixelate-out transition
  • Animate from large to 1 for a reveal/de-pixelate effect
  • Pulse between values for a glitchy digital aesthetic

Use Cases

  • Retro gaming look — Pixel size 3–6 for a consistent low-res feel
  • Transition effect — Keyframe pixel size from 1 to 50 to dissolve into blocks
  • Censorship/redaction — Large pixel size (20+) during specific timeline sections
  • Digital glitch — Rapidly keyframe between 1 and 10–20
  • Abstract art — Very large pixel size (50+) turns the image into a color grid

Combining with Other Shaders

Pixelate works well in combination:

  • Pixelate → Chromatic Aberration — Blocky with color fringe
  • Glow → Pixelate — Bloom gets chunked into blocks
  • Pixelate → Glow — Each pixel block gets a soft glow edge
Warning

Shader stacking order affects the result. Pixelate applied before other shaders produces blocky inputs to those effects. Applied after, it downsamples the final result.

Technical Notes

  • Single-pass fragment shader
  • Uses nearest-neighbor sampling — each pixel in a block takes the color of the block's top-left corner
  • Block grid is aligned to the canvas origin for consistent tiling
  • At pixel size 1, the shader is effectively a no-op (pass-through)