Implementing screen space ambient occlusion
Screen space ambient occlusion (SSAO) is an image-based technique used to approximate global illumination in real time. Ambient occlusion, at its core, provides a simplified representation of global illumination. It can be thought of as the amount of open “sky” visible from a point on a surface, unobstructed by nearby geometry. In its most basic implementation, this is estimated by sampling several points around the surface point of interest and determining how visible they are from that central point. Let’s take a look at a simple implementation of this technique.
Getting ready
The demo application for this recipe, Chapter10/04_SSAO
, implements basic steps for SSAO. Before going into this recipe, make sure to read the earlier ones in this chapter: Implementing offscreen rendering in Vulkan and Implementing full-screen triangle rendering.
How to do it...
Instead of tracing the depth buffer’s height...