Skip to content

Dither

Reduce color depth with per-pixel patterned or error-diffused thresholding. Covers ordered (Bayer / White Noise) and error-diffusion (Floyd-Steinberg / Atkinson) algorithms across Luminance, RGB, and Palette quantization modes.

Category: Effects Menu path: Effects > Dither

Ports

PortTypeDirectionDescription
inimageRgba16finputInput image
outimageRgba16foutputDithered result

Parameters

ParamTypeDefaultDescription
algorithmstringBayer 4x4Pattern / error-diffusion strategy. See Algorithms below.
colorModestringRGBLuminance / RGB / Palette. See Color modes below.
levelsscalar4Per-channel quantization steps for Luminance & RGB modes. Ignored in Palette mode.
palettegradientRamp4-stop Game Boy DMGPalette stops for Palette mode. Up to 16 stops.
strengthscalar1Mix between original (0) and dithered output (1).
scalescalar1Pattern pixel size — 1 = native, 2 = chunky 2×2 blocks, etc. Ordered methods only.
rotationscalar0Pattern rotation in degrees. Ordered methods only.
seedscalar0Pattern offset for White Noise.
cyclescalar0Animatable offset for White Noise — drive with Time for rolling-static effect.
serpentinebooleantrueAlternate row direction in error-diffusion to reduce diagonal-streak artifacts.
downsamplescalar1Nearest-neighbor pixel snap before dithering — N = each NxN input block becomes one chunky pixel sharing one dither sample. Different from scale: scale resizes the pattern, downsample resizes the image. Match both for true Game Boy / NES looks where each chunky pixel is one quantized dither sample.

Algorithms

NameTypeNotes
Bayer 2x2Ordered (GPU)Coarsest pattern, very visible texture. Good for chunky retro looks.
Bayer 4x4Ordered (GPU)Default. Classic newsprint feel — most common ordered dither size.
Bayer 8x8Ordered (GPU)Smoothest ordered pattern. Subtle texture, more colors per visible block.
White NoiseOrdered (GPU)Random per-pixel threshold, hash-based. Animate cycle for "rolling TV static" texture.
Floyd-SteinbergError diffusion (CPU)Classic newspaper / scanned-image look. Distributes 100% of quantization error to neighbors.
AtkinsonError diffusion (CPU)Classic Mac dithering. Lighter than Floyd-Steinberg (only 6/8 of error distributed) — produces higher-contrast / blown-highlight look.

Error-diffusion methods (Floyd-Steinberg, Atkinson) read the input back to CPU and run a serial per-pixel pass. At Full quality on 4K this is slow; use at Draft / Preview during scrub and drop a FileCache after for full-quality playback. Ordered methods (Bayer / White Noise) run as a single GPU shader pass and are essentially free.

Color modes

  • Luminance — convert input to grayscale via BT.709 weights, dither the single channel, output gray. Best for high-contrast 1-bit / 2-bit looks.
  • RGB — dither each channel independently with a shared threshold (so neighboring pixels stay correlated). Most colors of any mode for the same levels value (e.g. levels=4 → 64 distinct colors).
  • Palette — map input luminance to the palette ramp position, snap to the nearest stop. With ordered dither, neighboring pixels alternate between adjacent stops to approximate values in between. Best for retro game-palette / duotone / posterized looks.

How it works

For ordered dither (Bayer / White Noise), each pixel receives a threshold value t ∈ [0, 1) from the pattern. The output is quantize(value + (t - 0.5) / (levels - 1)) — a uniform gray dithers symmetrically around its quantized value, producing the perception of intermediate shades.

For error diffusion (Floyd-Steinberg / Atkinson), pixels are processed in scan order. Each pixel's quantization error is distributed to its forward neighbors with algorithm-specific weights. Serpentine scanning alternates row direction to break diagonal artifacts that pure left-to-right ordering produces in flat regions.

In Palette mode the pattern threshold offsets the luma-to-position mapping, so adjacent stops dither between each other based on the local pixel's intermediate luma. Position the stops to control band sizes — e.g. a 4-stop palette at [0, 0.33, 0.66, 1] gives uniform 4-color banding; clustering stops near 0.5 makes mid-tones bandy and shadows / highlights flatter.

Usage examples

Game Boy DMG monochrome (chunky pixels). algorithm = Bayer 4x4, colorMode = Palette, default 4-stop green palette, downsample = 4, scale = 4. The chunky pixels match the dither pattern size — each "screen pixel" is one quantized dither sample. For full-screen-height authentic Game Boy proportions on a 1920×1080 comp, try downsample = 8.

Game Boy DMG (high-res). Same as above but downsample = 1 — preserves source detail with the green palette quantization. The default settings are pre-tuned for this.

1-bit threshold mono. algorithm = Bayer 8x8, colorMode = Luminance, levels = 2. Classic newsprint b&w. Push levels = 3 for a richer 1-bit look.

Vaporwave duotone. algorithm = Bayer 4x4, colorMode = Palette, 2-stop palette of pink + cyan.

Animated TV static. algorithm = White Noise, colorMode = RGB, levels = 8. Drive cycle with Time.frame * 0.1 for a subtle dither that breathes per frame; or Time.frame for outright static.

Atkinson-style "scanned newsprint". algorithm = Atkinson, colorMode = Luminance, levels = 2, serpentine = true. Best at Draft / Preview during scrub; cache for full-quality playback.

Tips

  • Combine with Posterize for a "quantize then dither" feel — the dither breaks up posterize's hard color bands.
  • Animate cycle slowly (e.g. Time.frame * 0.05) on White Noise to give the dither a subtle organic breath without distracting flicker.
  • Use scale instead of switching matrix size if you want a chunkier Bayer look — Bayer 4x4 at scale = 2 looks similar to Bayer 8x8 while keeping the smaller matrix's harmonic content.
  • Error diffusion + RGB mode can produce striking psychedelic banding because errors propagate independently per channel. Pair with serpentine = false for maximally aggressive diagonal artifacts as a stylistic choice.
  • Posterize — hard-edged color quantization without dithering. Pairs well as upstream.
  • Threshold — single-cutoff binarization. Use Dither with levels = 2 for a softer threshold.
  • Mosaic — pixelation. Compose with Dither for "low-res, low-bit" looks.
  • DrawAscii — character-based luminance mapping. Different aesthetic, similar quantization spirit.