I recently decided it was time to take another look at SSAO as it's a technique that should complement lighting volumes quite well. Due to their sparse nature lighting volumes don't provide mid/high frequency lighting detail so SSAO should help add some of that lost lighting detail back into the scene.
There's already been a heck of a lot written about SSAO and I don't have much more to add so my plan is to keep this post fairly brief. My first implementation attempts were several years ago now and although the results were okay the shaders were pretty complicated. They often involved sampling both normal and depth buffers, reconstructing 3D positions and also required lots of per pixel matrix multiplications. The technique shown here only requires a depth buffer and is quite straight forward to implement. You can read all about it in
Rendering techniques in Toy Story III on the Advances in Real-Time Rendering in 3D Graphics and Games SIGGRAPH 2010 page.
For these shots I'm using a total of 32 SSAO samples per pixel. If that gets to be too much of a frame rate killer I can dial it back but for now it's looking pretty good. The SSAO only affects the ambient light provided by the light volume, direct light remains unaffected.
Isolated SSAO
SSAO with light volumes
Full lighting with textures