Screen-Space Ambient Occlusion & Horizon-Based Ambient Occlusion


Completed for a course titled Advanced Realtime Rendering Techniques in which students researched and implemented two papers of their choosing (within parameters). In this particular case, the two techniques chosen were Screen-Space Ambient Occlusion (SSAO) and Horizon-Based Ambient Occlusion (HBAO).

The SSAO side of the project was built following José María Méndez's wonderful post on GameDev.net which provided the base for my own GLSL implementation.

Since HBAO is discussed much less, it was a bit more of a challenge to find good documentation on. Luckily, NVIDIA provided several papers (since they figured it out) and a working DirectX example that was buried in their website. Like the Méndez paper, this served as a base for my own implementation.

I created my own source of noise used in both implementations via a texture created at run-time using C++11's new random facilities and a little math. Extensive controls were added to allow for color shifting, tuning of each programs' various tweakable variables and such using GLUI.

HBAO ran a bit slowly on my (five year old) laptop, but it runs amazingly fast on my (brand new) desktop. Visually, HBAO is far more striking, however it is hindered a bit by my noise function producing far more visual noise than in the SSAO output.

Here are some pics:
Front, HBAO + PhongFront, HBAO-onlyFront, SSAO + PhongFront, SSAO-onlyBack, HBAO + PhongBack, HBAO-onlyBack, SSAO + PhongBack, SSAO-only

Published on  September 8th, 2012