Tiled deferred shading
Cut the screen into small tiles, find each tile's depth range and the lights touching it, then shade the G-buffer pixels with just that tile's light list.
Also known as tiled shading, tile-based light culling
In the family Performance, LOD & compression, light culling
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 | Built in | URP Renderer > Rendering Path = Deferred; HDRP Camera > Lit Shader Mode = Deferred docs URP Deferred and HDRP Deferred. |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | Built in | MTLTileRenderPipelineDescriptor + imageblock (on-chip Apple Silicon TBDR tile memory deferred pass) docs |
How it works
After the G-buffer pass, a compute shader processes one tile per workgroup. Threads reduce the tile's min and max depth, build its frustum, and cooperatively test all lights against it, appending hits to a list in shared memory. Then each thread shades its pixel by looping that list, reading material data from the G-buffer.
Because lighting is done once per pixel and light lists are small, many hundreds of lights become affordable, though G-buffer bandwidth and material variety are limited.
When to choose it
Reach for it when
- too many small lights tank deferred performance
- each pixel shades every light unnecessarily
- need a light list per screen region
- scene with hundreds of point lights on opaque geometry
Choose it with a deferred renderer and many small lights. Prefer Clustered forward shading when you need MSAA, transparency, or wide depth ranges inside tiles. Prefer plain forward rendering with few lights on mobile.
Field marks
- Tiles with a large depth range, such as at silhouettes, get excess lights
- Transparent surfaces do not fit the G-buffer
- MSAA multiplies G-buffer cost
- Only one material model per G-buffer layout
Presets
Toy 2D tile light-culling heat map for animated point lights
{
"LIGHTS": 24,
"TILE": 32
}Show GLSL (28 lines)
// Toy 2D light-culling view: screen split into 32px tiles, heat colour = number of lights whose radius overlaps the tile.
const int LIGHTS = 24;
const float TILE = 32.0;
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 tileMin = floor(fragCoord / TILE) * TILE, tileMax = tileMin + TILE;
int cnt = 0; float lit = 0.0, ring = 1e9, cdist = 1e9;
for (int i = 0; i < LIGHTS; i++) {
float f = float(i);
vec2 c = (vec2(0.5) + 0.42 * vec2(sin(f * 2.3 + iTime * 0.4 + f * f * 0.05), cos(f * 1.7 + iTime * 0.3))) * iResolution.xy;
float r = 40.0 + 55.0 * fract(sin(f * 12.9) * 4375.0);
vec2 q = clamp(c, tileMin, tileMax);
if (distance(q, c) < r) cnt++;
float d = distance(fragCoord, c);
lit += smoothstep(r, 0.0, d) * smoothstep(r, 0.0, d);
ring = min(ring, abs(d - r));
cdist = min(cdist, d);
}
float x = float(cnt) / 6.0;
vec3 heat = clamp(vec3(1.5 * x, 1.5 - abs(3.0 * x - 1.5), 1.5 - 1.5 * x), 0.0, 1.0);
vec3 col = mix(vec3(0.04, 0.05, 0.08), heat * 0.55, cnt > 0 ? 1.0 : 0.0);
col += vec3(1.0, 0.9, 0.7) * lit * 0.12;
vec2 g = fract(fragCoord / TILE);
col = mix(col, vec3(0.0), (g.x < 0.04 || g.y < 0.04) ? 0.55 : 0.0);
col = mix(col, vec3(1.0), smoothstep(1.2, 0.5, ring) * 0.7);
col = mix(col, vec3(1.0), smoothstep(4.0, 2.5, cdist));
fragColor = vec4(pow(col, vec3(0.8)), 1.0);
}
Attribution: written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| tiled-deferred-shading-specimen | Tesla T4 1920x1080 | 14.7× baseline (moderate) · 0.484 ms / 0.505 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| tiled-deferred-shading-specimen | NVIDIA L4 1920x1080 | 12.9× baseline (moderate) · 0.205 ms / 0.206 ms · 2.4× faster on L4 | opengl-timer-query · Cross-architecture validation |
| tiled-deferred-shading-specimen | NVIDIA A100-SXM4-40GB 1920x1080 | 9.23× baseline (moderate) · 0.266 ms / 0.266 ms · 1.8× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): cited by ReSTIR DI: Spatiotemporal Reservoir Resampling for Direct Lighting.
Crosses
- Hierarchical-Z occlusion culling: The depth pre-pass gives per-tile min and max depth for light culling and the pyramid for object culling.
Sources
- primaryOla Olsson, Ulf Assarsson (2011). Tiled Shading. Journal of Graphics, GPU, and Game Tools.Verified via crossref · 2026-11-29doi:10.1080/2151237x.2011.621761
- primaryOla Olsson, Markus Billeter, Ulf Assarsson (2012). Tiled and clustered forward shading. ACM SIGGRAPH 2012 Posters on - SIGGRAPH '12.Verified via crossref · 2026-11-29doi:10.1145/2343045.2343095