---
id: "gpu-driven-rendering"
title: "GPU-driven rendering"
aliases: [GPU-driven pipeline, indirect rendering]
domain: "performance"
stage: "performance"
realtime: "realtime"
platforms: [webgpu, desktop-gpu, unity, unreal]
year_introduced: 2015
inputs: [mesh]
outputs: [gbuffer, depth]
style: "both"
dynamic: "both"
cost: "cheap"
authority: "Haar & Aaltonen"
url: "https://texelatlas.vercel.app/t/gpu-driven-rendering/"
sources_verified_at: "2026-11-29"
---
# GPU-driven rendering (Haar & Aaltonen)

> Move scene culling, LOD choice and draw-call generation onto the GPU so one indirect call renders a whole scene's visible clusters without CPU per-object work.

## Reach for it when

- cpu is bottlenecked submitting thousands of draw calls
- scene with tens of thousands of objects runs slowly
- want culling and lod decided on the gpu
- reduce per-object cpu work in big scenes
- render a whole scene with one indirect call

## How it works

Geometry is kept in a few big vertex and index buffers, and per-instance data lives in a scene buffer. A compute pass tests each instance or cluster against the frustum and a depth pyramid, writes compacted draw arguments, and an indirect multi-draw consumes them.

The usual refinement is two-pass culling: draw what was visible last frame, rebuild the depth pyramid from that, then test and draw the remainder. Bindless or array-indexed materials keep state changes out of the loop, and a visibility buffer can defer material evaluation.

## When to use it

Choose it for scenes with tens of thousands of objects where CPU draw submission is the limit. Prefer `gpu-instancing` style batching when many copies of few meshes suffice, which is simpler. Prefer plain engine culling for small scenes. Pair with [Mesh shaders](https://texelatlas.vercel.app/t/mesh-shaders.md) where hardware supports them.

## Cost

cheap — Culling is a cheap compute pass; the savings are mostly CPU time.
Measured GPU Weight: 3.74× baseline (light) — 0.1231 ms median / 0.1262 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 3.06× baseline (light) — 0.0486 ms median (2.53× faster on L4).
Ampere A100 scaling: 2.74× baseline (light) — 0.0788 ms median (1.56× faster on A100).

## Failure modes

- Stale depth pyramid causes flicker or popping of moving objects in one-pass schemes
- Needs bindless or large texture arrays, limiting platforms
- Indirect draws are harder to debug and profile
- Transparent objects need ordering the compute pass does not give

## Engine support

- metal: builtin — `MTLIndirectCommandBuffer (GPU-encoded draws/dispatches)` (evidence: https://developer.apple.com/tutorials/data/documentation/metal/mtlindirectcommandbuffer.json, checked 2026-12-01)
- unity: builtin — `URP/HDRP Asset > Rendering > GPU Resident Drawer = Instanced Drawing` (evidence: https://github.com/Unity-Technologies/Graphics/blob/557f6ac22b948284f57ffae6a789751fd1f63620/Packages/com.unity.render-pipelines.high-definition/Documentation~/gpu-resident-drawer.md, checked 2026-12-01) — Unity 6 GPU Resident Drawer with GPU occlusion culling.
- unreal: builtin — `Nanite GPU-driven cluster culling, LOD selection, and indirect rendering pipeline` (evidence: https://dev.epicgames.com/documentation/en-us/unreal-engine/nanite-virtualized-geometry-in-unreal-engine, checked 2026-12-01)
- webgpu: builtin — `renderPass.drawIndexedIndirect(buffer, offset); computePass.dispatchWorkgroupsIndirect(buffer, offset)` (evidence: https://www.w3.org/TR/webgpu/, checked 2026-12-01) — Indirect draw/dispatch and render bundles; no multi-draw-indirect or ICB.

## Dataflow

- Inputs: mesh
- Outputs: gbuffer, depth
- Platforms: webgpu, desktop-gpu, unity, unreal

## Presets

### GPU-Driven Rendering — unfiltered CPU draw flood (left) vs compute frustum + Hi-Z occlusion culling & LOD clusters (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_FOV_WIDTH": 0.55,
  "P_OCCLUDER_H": 0.75,
  "P_SCAN_SPEED": 0.55,
  "P_SPLIT": 0.46
}
```

```glsl
const float P_FOV_WIDTH = 0.55; // P Frustum Half-FOV [0.25, 0.95, 0.05]
const float P_OCCLUDER_H = 0.75; // P Hi-Z Occluder Wall [0.0, 1.0, 0.05]
const float P_SCAN_SPEED = 0.55; // P Camera Sweep [0.0, 1.6, 0.05]
const float P_SPLIT = 0.46; // P CPU Flood / GPU Cull [0.0, 1.0, 0.02]

float hash21(vec2 p) {
  p = fract(p * vec2(127.1, 311.7));
  p += dot(p, p + 34.5);
  return fract(p.x * p.y);
}

vec3 aces(vec3 x) {
  x = max(x, 0.0);
  return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
  vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
  float screenX = fragCoord.x / max(iResolution.x, 1.0);
  float split = clamp(P_SPLIT, 0.0, 1.0);
  float fov = clamp(P_FOV_WIDTH, 0.20, 1.05);
  float occStr = clamp(P_OCCLUDER_H, 0.0, 1.0);
  float t = iTime * max(P_SCAN_SPEED, 0.0);

  // Angled isometric tactical map of 14x10 GPU-instanced scene clusters
  vec2 world = uv * 2.35;
  vec3 col = vec3(0.04, 0.06, 0.10);

  // Subtle spatial hash grid floor
  vec2 gLine = abs(fract(world * 3.0) - 0.5);
  float grid = smoothstep(0.05, 0.012, min(gLine.x, gLine.y));
  col += vec3(0.06, 0.10, 0.16) * grid;

  // Virtual camera orbiting at bottom-left sweeping across the instanced city
  vec2 camPos = vec2(-0.78, -0.78);
  float camAng = 0.78 + 0.42 * sin(t * 0.65);
  vec2 camDir = vec2(cos(camAng), sin(camAng));
  vec2 camRight = vec2(-camDir.y, camDir.x);

  // Large Hi-Z depth occluder barrier in middle of frustum
  vec2 occCenter = camPos + camDir * 0.88 + camRight * 0.08;
  vec2 toOcc = world - occCenter;
  float occAlong = dot(toOcc, camDir);
  float occAcross = dot(toOcc, camRight);
  float occHalfW = 0.28 * occStr;

  // Test instanced clusters on a regular grid
  vec2 cellScale = vec2(3.6);
  vec2 cid = floor(world * cellScale);
  vec2 cf = fract(world * cellScale) - 0.5;
  vec2 cPos = (cid + 0.5) / cellScale;

  // Cluster geometry & instance bounding box
  float rnd = hash21(cid + vec2(17.3, 41.1));
  float boxR = 0.22 + 0.16 * rnd;
  vec2 dBox = abs(cf) - vec2(boxR);
  float inCluster = smoothstep(0.03, -0.02, max(dBox.x, dBox.y));
  float boxBorder = smoothstep(0.055, 0.015, abs(max(dBox.x, dBox.y)));

  // Evaluate frustum & Hi-Z occlusion for cluster center cPos
  vec2 rel = cPos - camPos;
  float depth = dot(rel, camDir);
  float lat = dot(rel, camRight);
  float halfSpan = max(depth * tan(fov * 0.72), 0.05);
  bool inFrustum = (depth > 0.12 && depth < 2.25 && abs(lat) < halfSpan);

  // Hi-Z shadow behind occluder wall
  float occDepth = 0.88;
  float projLat = (depth > 0.01) ? (lat * (occDepth / max(depth, 0.01))) : 9.0;
  bool hizOccluded = (occStr > 0.05) && (depth > occDepth + 0.08) && (abs(projLat - 0.08) < occHalfW);

  if (inCluster > 0.01 && length(cPos - camPos) > 0.22) {
    if (screenX < split) {
      // Left: CPU submits ALL instances blindly (uniform red-orange draw-call flood)
      vec3 cpuCol = mix(vec3(0.62, 0.22, 0.18), vec3(0.95, 0.42, 0.24), rnd);
      col = mix(col, cpuCol * (0.65 + 0.35 * boxBorder), inCluster);
    } else {
      // Right: GPU compute culling + indirect draw compaction + distance LOD selection!
      vec3 instCol;
      if (!inFrustum) {
        // Frustum-culled (skipped completely, zero indirect draw command!)
        instCol = vec3(0.09, 0.12, 0.18);
      } else if (hizOccluded) {
        // Hi-Z depth-pyramid occluded (culled in compute pass!)
        instCol = vec3(0.28, 0.10, 0.18);
      } else {
        // Visible -> select LOD tier by screen-space distance (LOD0 emerald, LOD1 cyan, LOD2 amber)
        if (depth < 0.95) instCol = vec3(0.16, 0.94, 0.56);
        else if (depth < 1.55) instCol = vec3(0.18, 0.76, 1.0);
        else instCol = vec3(0.98, 0.74, 0.22);
      }
      col = mix(col, instCol * (0.72 + 0.40 * boxBorder), inCluster);
    }
  }

  // Draw the glowing frustum cone rays and Hi-Z occluder barrier
  vec2 relP = world - camPos;
  float dp = dot(relP, camDir);
  float lp = dot(relP, camRight);
  float coneSpan = dp * tan(fov * 0.72);
  float edgeFrust = smoothstep(0.024, 0.005, abs(abs(lp) - coneSpan)) * step(0.0, dp) * step(dp, 2.25);
  float farArc = smoothstep(0.024, 0.005, abs(dp - 2.25)) * step(abs(lp), coneSpan);
  col = mix(col, vec3(0.25, 0.95, 1.0), clamp(edgeFrust + farArc, 0.0, 1.0) * 0.85);

  // Hi-Z occluder wall slab
  if (occStr > 0.05) {
    float wall = smoothstep(0.02, -0.01, max(abs(occAlong) - 0.045, abs(occAcross) - occHalfW));
    col = mix(col, vec3(0.98, 0.34, 0.42), wall);
  }
  // Camera icon at apex
  float camDot = smoothstep(0.07, 0.04, length(world - camPos));
  col = mix(col, vec3(1.0, 0.96, 0.82), camDot);

  float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
  col = mix(col, vec3(0.95, 0.98, 1.0), sep);
  fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}
```

Attribution: MIT — written for this index.

## Lineage

- extends [Hierarchical-Z occlusion culling](https://texelatlas.vercel.app/t/hierarchical-z-occlusion-culling.md)
- extended by [Meshlets (cluster rendering)](https://texelatlas.vercel.app/t/meshlets.md)

## Combines with

- [Hierarchical-Z occlusion culling](https://texelatlas.vercel.app/t/hierarchical-z-occlusion-culling.md): The depth pyramid built from last frame's depth is what the culling compute shader samples.

## Combination ideas

- [Meshlet foliage with compute-rasterized atomic spores](https://texelatlas.vercel.app/ideas/meshlet-foliage-atomic-spore-raster/)
- [Meshlet kelp forests through underwater PSF scattering](https://texelatlas.vercel.app/ideas/meshlet-kelp-small-angle-underwater-psf/)

## Sources

1. [primary] Ulrich Haar, Sebastian Aaltonen GPU-Driven Rendering Pipelines. SIGGRAPH 2015 Advances in Real-Time Rendering. https://advances.realtimerendering.com/s2015/index.html (verified via http on 2026-11-29)
2. [implementation] zeux (2018) zeux/niagara. https://github.com/zeux/niagara License: MIT. (verified via github on 2026-11-29)

## Cite this entry

Texel. "GPU-driven rendering." https://texelatlas.vercel.app/t/gpu-driven-rendering/ (accessed 2026-12-01).
