Edge-avoiding a-trous wavelet filter
A cascade of small sparse blur kernels whose taps double in spacing each pass, weighted by normal, depth and colour similarity, so large smooth areas blur broadly while edges survive.
Also known as a-trous filter, edge-avoiding wavelet, A-trous denoiser, à-trous
In the family Post-processing, color & imaging, edge-aware filtering
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | |
| Unity | None found | |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
The à-trous ('with holes') scheme approximates a wide blur using a fixed small kernel, typically the 5x5 cubic B-spline [1 4 6 4 1]/16 outer product. In iteration i the same kernel is applied with taps spaced 2^i pixels apart (inserting 'holes'), so five or six iterations cover a radius of tens of pixels at constant cost per pass. Each tap weight is multiplied by edge-stopping terms from guide buffers: a Gaussian-like function of the difference in colour or luminance, one of normal similarity (typically a clamped dot product raised to a power), and one of depth or position difference. After normalising by the weight sum, the result is used as input to the next pass. Iterating this is a wavelet-like decomposition without actually storing detail coefficients, and it maps well to compute or fragment shaders with ping-pong textures.
When to choose it
Reach for it when
- need a cheap large radius blur that keeps object edges
- noisy ambient occlusion needs an edge aware cleanup
- build my own denoiser from normals and depth guides
- bilateral blur too slow for big radius
- blur noisy lighting without bleeding across silhouettes
Choose it as the spatial stage of a hand-built denoiser, for filtering noisy lighting such as ray-traced AO, shadows or GI with a G-buffer guide, or as a cheap large-radius edge-aware smoother for SSAO. It is the building block inside Spatiotemporal Variance-Guided Filtering (SVGF), and the spatial half of NVIDIA Real-time Denoisers (ReBLUR, ReLAX). Prefer Spatiotemporal Variance-Guided Filtering (SVGF) when you also need temporal accumulation and variance guidance, Intel Open Image Denoise (OIDN) for final offline frames, and a bilateral or Bilateral Normal Integration-style filter only when a single small radius suffices.
Field marks
- Blotchy, low-frequency residual noise when the guide buffers do not capture lighting discontinuities
- Grid or ringing patterns from sparse taps at large steps on high-frequency input
- Light bleeding across thin features whose depth and normal are similar to their surroundings
- Over-smoothed texture detail when applied to final colour instead of demodulated irradiance
- Shadow and contact detail lost at big steps unless the colour/luminance term gates the weights
Presets
3-pass edge-avoiding a-trous denoise (noisy | filtered)
{
"steps": [
1,
2,
4
],
"kernel": "3x3 [1 2 1]/4",
"sigma_color": 0.15
}Show GLSL (65 lines)
// GLSL ES 3.0, Shadertoy-style. Left half: noisy image. Right half: three edge-avoiding a-trous passes (steps 1,2,4)
// evaluated analytically by nesting the filter, guided by the clean "albedo/normal" image.
const float SIGMA_C = 0.15; // colour edge-stopping strength on the guide
const float SIGMA_N = 0.9; // noise amplitude
vec3 clean(vec2 p) {
vec2 q = p / iResolution.y;
vec3 bg = mix(vec3(0.15, 0.25, 0.45), vec3(0.85, 0.75, 0.55), q.y);
float d1 = length(q - vec2(0.45, 0.5)) - 0.22;
float d2 = length(q - vec2(1.0, 0.45)) - 0.18;
vec3 col = bg;
col = mix(vec3(0.9, 0.3, 0.2), col, smoothstep(-0.003, 0.003, d1));
col = mix(vec3(0.2, 0.8, 0.4), col, smoothstep(-0.003, 0.003, d2));
return col;
}
float hash12(vec2 p) {
vec3 p3 = fract(vec3(p.xyx) * 0.1031);
p3 += dot(p3, p3.yzx + 33.33);
return fract((p3.x + p3.y) * p3.z);
}
vec3 noisy(vec2 p) {
vec2 c = floor(p) + 0.5;
float n = hash12(c) - 0.5;
float m = hash12(c + 17.0) - 0.5;
return clean(c) * (1.0 + SIGMA_N * n) + vec3(0.0, 0.0, 0.0) * m;
}
float kern(int i) { return i == 0 ? 0.5 : 0.25; }
float edgeW(vec2 p, vec2 q) {
vec3 d = clean(p) - clean(q);
return exp(-dot(d, d) / (SIGMA_C * SIGMA_C));
}
vec3 level1(vec2 p, float s) {
vec3 sum = vec3(0.0); float ws = 0.0;
for (int y = -1; y <= 1; y++) for (int x = -1; x <= 1; x++) {
vec2 q = p + vec2(float(x), float(y)) * s;
float w = kern(abs(x)) * kern(abs(y)) * edgeW(p, q);
sum += w * noisy(q); ws += w;
}
return sum / ws;
}
vec3 level2(vec2 p, float s) {
vec3 sum = vec3(0.0); float ws = 0.0;
for (int y = -1; y <= 1; y++) for (int x = -1; x <= 1; x++) {
vec2 q = p + vec2(float(x), float(y)) * s * 2.0;
float w = kern(abs(x)) * kern(abs(y)) * edgeW(p, q);
sum += w * level1(q, s); ws += w;
}
return sum / ws;
}
vec3 level3(vec2 p, float s) {
vec3 sum = vec3(0.0); float ws = 0.0;
for (int y = -1; y <= 1; y++) for (int x = -1; x <= 1; x++) {
vec2 q = p + vec2(float(x), float(y)) * s * 4.0;
float w = kern(abs(x)) * kern(abs(y)) * edgeW(p, q);
sum += w * level2(q, s); ws += w;
}
return sum / ws;
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / iResolution.xy;
vec3 col = (uv.x < 0.5) ? noisy(fragCoord) : level3(fragCoord, 1.0);
if (abs(uv.x - 0.5) < 0.003) col = vec3(1.0);
fragColor = vec4(col, 1.0);
}
Attribution: written for this index; algorithm follows the cited paper, analytic nesting used so the demo needs no buffers · basis: 0
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| atrous-three-pass-guided-denoise | Tesla T4 1920x1080 | 772× baseline (extreme) · 25.4 ms / 25.7 ms | opengl-timer-query · 20 frames · GPU Weight Atlas · Colab T4 sweep |
| atrous-three-pass-guided-denoise | NVIDIA L4 1920x1080 | 585× baseline (extreme) · 9.30 ms / 9.41 ms · 2.7× faster on L4 | opengl-timer-query · Cross-architecture validation |
| atrous-three-pass-guided-denoise | NVIDIA A100-SXM4-40GB 1920x1080 | 572× baseline (extreme) · 16.5 ms / 16.6 ms · 1.5× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
Crosses
- Spatiotemporal Variance-Guided Filtering (SVGF): SVGF drives the à-trous cascade with variance from temporal moments; the filter is the spatial half.
- Screen-Space Ambient Occlusion: Noisy per-pixel-rotated AO is cleaned by an edge-aware à-trous pass using depth and normals.
Sources
- primaryDammertz, Sewtz, Hanika, Lensch. Edge-Avoiding A-Trous Wavelet Transform for fast Global Illumination Filtering. jo.dreggn.org.Verified via live page · 2026-11-29
- implementationNVIDIAGameWorks (2017). NVIDIAGameWorks/Falcor. Real-Time Rendering FrameworkGitHub API · license NOASSERTION · 2026-11-29