Blue-noise dithering
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.
Also known as Dithering, Color Banding Dithering, Screen-Space Dithering
In the family Stylized & non-photorealistic rendering, dithering
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | Built-in post-process dithering uses a pseudo-random hash rather than blue-noise textures. |
| Godot 4.7 | None found | Built-in debanding uses an analytic screen-space dither (screen_space_dither), not blue-noise textures. |
| Unity | None found | |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
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 choose it
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
Choose it when you want grain-like dithering that looks organic and does not show matrix structure. Prefer Ordered dithering with Bayer matrices for a deliberately retro lattice, and Error-diffusion dithering (Floyd-Steinberg) when output quality matters more than stability or parallelism.
Field marks
- 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
Presets
A 1-bit vertical ramp thresholded by white noise (left) and by high-pass (blue-like) noise (right)
{
"GAINB": 7
}Show GLSL (17 lines)
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
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| blue-noise-dithering-specimen | Tesla T4 1920x1080 | 1.57× baseline (feather) · 0.051 ms / 0.053 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| blue-noise-dithering-specimen | NVIDIA L4 1920x1080 | 1.24× baseline (feather) · 0.020 ms / 0.020 ms · 2.6× faster on L4 | opengl-timer-query · Cross-architecture validation |
| blue-noise-dithering-specimen | NVIDIA A100-SXM4-40GB 1920x1080 | 1.00× baseline (feather) · 0.029 ms / 0.029 ms · 1.8× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
Crosses
- 1-bit rendering that meters like a camera: 1-bit or few-level dithered rendering that stays readable from dark caves to bright skies. The luminance histogram built for auto exposure also shapes the dither threshold curve, so dot density spreads across the scene's actual tones.
Sources
- primaryRobert A. Ulichney (1993). <title>Void-and-cluster method for dither array generation</title>. SPIE Proceedings.Verified via crossref · 2026-11-29doi:10.1117/12.152707
- tutorialChristoph Peters. Free blue noise textures. momentsingraphics.de.Verified via live page · 2026-11-29
- implementationMomentsInGraphics (2017). MomentsInGraphics/BlueNoise. A SciPy implementation of the void-and-cluster method for generation of blue noise textures with arbitrary dimension.GitHub API · license CC0-1.0 · 2026-11-29