---
id: "blue-noise-dithering"
title: "Blue-noise dithering"
aliases: [Dithering, Color Banding Dithering, Screen-Space Dithering]
domain: "npr"
stage: "post"
realtime: "realtime"
platforms: [webgl2, webgpu, desktop-gpu, mobile-gpu, unity, unreal, godot, cpu]
year_introduced: 1993
inputs: [ldr-image, hdr-image, texture]
outputs: [ldr-image]
style: "stylized"
dynamic: "both"
cost: "cheap"
authority: "Ulichney, 1993"
url: "https://texelatlas.vercel.app/t/blue-noise-dithering/"
sources_verified_at: "2026-11-29"
---
# Blue-noise dithering (Ulichney, 1993)

> Dithers by comparing against a tiled blue-noise texture, whose energy sits in high frequencies, giving an even grain without the visible grid of Bayer patterns.

## Reach for it when

- dithering shows a visible grid pattern
- want organic grain-like dither without matrix structure
- banding in gradients but ordered dither looks too regular
- need stable cheap dithering that looks even

## How it works

A blue-noise texture is a threshold image in which neighbouring values are anti-correlated, so any thresholded slice produces evenly spaced dots with no low-frequency clumps. It can be generated offline with the void-and-cluster algorithm, which repeatedly swaps pixels between the tightest cluster and the largest void until a rank is assigned to every pixel. At runtime it is used exactly like a Bayer matrix: sample the tiling texture at pixel coordinates, add to the quantizer input, then floor. Free tileable textures exist in many sizes and channel counts. For animation, add a golden-ratio offset per frame to create temporally decorrelated sequences.

## When to use it

Choose it when you want grain-like dithering that looks organic and does not show matrix structure. Prefer [Ordered dithering with Bayer matrices](https://texelatlas.vercel.app/t/ordered-dithering-bayer.md) for a deliberately retro lattice, and [Error-diffusion dithering (Floyd-Steinberg)](https://texelatlas.vercel.app/t/error-diffusion-dithering.md) when output quality matters more than stability or parallelism.

## Cost

cheap — One texture fetch and compare per pixel.
Measured GPU Weight: 1.57× baseline (feather) — 0.0515 ms median / 0.0531 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 1.24× baseline (feather) — 0.0197 ms median (2.61× faster on L4).
Ampere A100 scaling: 1× baseline (feather) — 0.0288 ms median (1.79× faster on A100).

## Failure modes

- Texture tiling shows as repeating patches at small texture sizes
- Screen-fixed grain slides over moving objects without per-frame offset
- Poorly generated textures with low-frequency leaks reintroduce clumps
- Texture must be sampled with nearest filtering, or thresholds blur

## Dataflow

- Inputs: ldr-image, hdr-image, texture
- Outputs: ldr-image
- Platforms: webgl2, webgpu, desktop-gpu, mobile-gpu, unity, unreal, godot, cpu

## Presets

### A 1-bit vertical ramp thresholded by white noise (left) and by high-pass (blue-like) noise (right) (glsl-fragment; rendered 2026-11-29)

```json
{
  "GAINB": 7
}
```

```glsl
float hash(vec2 c){uvec2 u=uvec2(ivec2(floor(c)));uint h=u.x*1597334673u^u.y*3812015801u;h^=h>>15;h*=2246822519u;h^=h>>13;h*=3266489917u;h^=h>>16;return float(h)*(1./4294967296.);}
float lum(vec3 c){return dot(c,vec3(.2126,.7152,.0722));}
vec3 gam(vec3 c){return pow(clamp(c,0.,1.),vec3(1./2.2));}

const float GAINB=7.0; // P
float wn(vec2 c){return hash(c+17.);}
void mainImage(out vec4 fragColor,in vec2 fragCoord){
  vec2 uv=(fragCoord-.5*iResolution.xy)/iResolution.y;bool R=uv.x>0.;vec2 q=vec2(uv.x+(R?-.25:.25),uv.y);
  vec2 p=floor(fragCoord);float v=clamp(uv.y+.5,0.,1.),thr;
  if(!R) thr=wn(p);
  else{float nb=0.;
    for(int j=-1;j<=1;j++)for(int i=-1;i<=1;i++)if(i!=0||j!=0)nb+=wn(p+vec2(float(i),float(j)));
    float n=wn(p)-nb/8.;thr=1./(1.+exp(-n*GAINB));}
  vec3 col=vec3(v>thr?.95:.05);
  if(abs(uv.x)<.0015)col=vec3(.5,.5,1.);
  fragColor=vec4(col,1.);
}
```

Attribution: written for this index

## Lineage

- extends [Ordered dithering with Bayer matrices](https://texelatlas.vercel.app/t/ordered-dithering-bayer.md)
- extended by [1-bit dithered 3D rendering (Obra Dinn style)](https://texelatlas.vercel.app/t/obra-dinn-1bit-dithered-3d.md)

## Combination ideas

- [1-bit rendering that meters like a camera](https://texelatlas.vercel.app/ideas/histogram-steered-dithering/)

## Sources

1. [primary] Robert A. Ulichney (1993) &lt;title&gt;Void-and-cluster method for dither array generation&lt;/title&gt;. SPIE Proceedings. https://doi.org/10.1117/12.152707 (verified via crossref on 2026-11-29)
2. [tutorial] Christoph Peters Free blue noise textures. momentsingraphics.de. https://momentsingraphics.de/BlueNoise.html (verified via http on 2026-11-29)
3. [implementation] MomentsInGraphics (2017) MomentsInGraphics/BlueNoise. https://github.com/MomentsInGraphics/BlueNoise License: CC0-1.0. (verified via github on 2026-11-29)

## Cite this entry

Texel. "Blue-noise dithering." https://texelatlas.vercel.app/t/blue-noise-dithering/ (accessed 2026-12-01).
