[Epic] Ray-traced ambient occlusion (SSAO fallback) #86

Open
opened 2026-09-27 05:44:58 +00:00 by backspace119 · 0 comments
Owner

Goal: ray-traced ambient occlusion on RT-capable GPUs, SSAO (#21) as the fallback tier - same output, same consumer.

Approach

  • Compute pass after the depth pre-pass: from the thin G-buffer position/normal, trace 1-2 short cosine-weighted rays per pixel (radius ~0.5-2 m, configurable) with rayQueryEXT, TerminateOnFirstHit, opaque fast path; alpha-mask casters via the shared candidate loop.
  • Half-resolution option + bilateral upsample for mid-range GPUs.
  • Denoise with the shared denoiser; output an AO texture the lit pass multiplies into ambient/probe lighting (not direct light).
  • SSAO (#21) writes the same texture on non-RT GPUs, so the lit shader has one path.

Children

  1. AO target + lit-pass integration (shared with SSAO).
  2. RTAO trace compute pass (+ half-res).
  3. Denoiser hookup + settings (RenderVKAO: 0 off, 1 SSAO, 2 RT; radius; intensity).
  4. Perf budget + GPU timer marks.

Size: M. Depends on: Temporal epic item 1 (thin G-buffer), denoiser epic. Relates: #21 SSAO.

**Goal:** ray-traced ambient occlusion on RT-capable GPUs, SSAO (#21) as the fallback tier - same output, same consumer. ### Approach - Compute pass after the depth pre-pass: from the thin G-buffer position/normal, trace 1-2 short cosine-weighted rays per pixel (radius ~0.5-2 m, configurable) with `rayQueryEXT`, TerminateOnFirstHit, opaque fast path; alpha-mask casters via the shared candidate loop. - Half-resolution option + bilateral upsample for mid-range GPUs. - Denoise with the shared denoiser; output an AO texture the lit pass multiplies into ambient/probe lighting (not direct light). - SSAO (#21) writes the same texture on non-RT GPUs, so the lit shader has one path. ### Children 1. AO target + lit-pass integration (shared with SSAO). 2. RTAO trace compute pass (+ half-res). 3. Denoiser hookup + settings (`RenderVKAO`: 0 off, 1 SSAO, 2 RT; radius; intensity). 4. Perf budget + GPU timer marks. **Size:** M. **Depends on:** Temporal epic item 1 (thin G-buffer), denoiser epic. **Relates:** #21 SSAO.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
backspace119/Slipstream#86
No description provided.