Home

Awesome

RTAO

This is an implementation of Ray Traced Ambient Occlusion (RTAO) using DXR. Code is based on a IntroToDXR Project by Adam Marrs - you should check it out for build instructions and code description.

Release Mode

How it works

RTAO is meant as a replacement for typical SSAO effects found in many rendering engines, and therefore is implemented in a similar way. It is executed as a post-processing effect in two passes, which are separate from the main geometry rendering pass:

  1. AO raytracing pass - uses normals and depth from main rendering pass to reconstruct world space position of visible pixels, and shoots AO rays in a normal-oriented hemisphere from there.
  2. Filtering pass - applies temporal filter (box filter) and spatial low-pass filter (gaussian blur) on a noisy result from previous pass

AO raytracing pass simply shoots selected number of AO rays, using directions from a pre-calculated sample-set. It uses basic temporal accumulation and filtering - AO is stored for a few previous frames in a cache. Cached values are first aligned with current frame using reverse reprojection (which requires motion vectors from a renderer). A filtering pass then applies a box filter on cached values, and a spatial filter to smooth out the results.

Where to go from now

This is a basic implementation that can (and should) be improved! Try this:

References

Requirements

Command Line Arguments

Licenses and Open Source Software

The code uses three dependencies:

The repository includes assets for use when testing the renderer: