Many gamers have heard of techniques to improve the appearance of games, such as anisotropic filtering and anti-aliasing. The ambient occlusion shading technology may not be so well known, but it can also bring great effects and please the player’s eye. Today, together with experts from Sapphire, we are looking at the topic of Ambient Occlusion.
Types of shading
Screen Space Ambient Occlusion (SSAO) technology estimates the exposure of a given surface to diffuse light. This is a method developed in 2007 by an employee of the Crytek studio and was first used in Crysis. The effect of using SSAO is a realistic appearance of the surface of objects in the game, as well as natural lighting of the entire scene.
The SSAO algorithm is applied as a pixel shader and analyzes the depth buffer. It is typically rendered at half the resolution of the entire scene, using 16 depth samples per pixel. Unfortunately, rendering at less than full resolution can result in unwanted flicker that can be hard to hide. For this reason, SSAO+ was developed. This is a streamlined version of SSAO where the effect is rendered at the full resolution of the scene. As you might guess, this has an impact on performance as the process requires four times as much processing power.
The decrease in efficiency was the reason for the development of further improvements. Horizon Based Ambient Occlusion (HBAO) uses slightly different algorithms and renders at full scene resolution, but only uses 4 depth samples per pixel. HBAO+, on the other hand, uses 36 samples, providing greater shading precision at the expense of doubling the computational power requirement of HBAO.
Impact on performance
Depending on the game and its optimization, the impact of ambient occlusion on performance can be significant (around 25%) or very small. In general, SSAO+ causes the greatest performance degradation and HBAO the least. It’s worth trying High Definition Ambient Occlusion (HDAO) if it’s available in the game options. Due to optimizations for AMD cards, this shading method should have the least impact on frame rate.
Impact on image quality
Applying even the most basic ambient occlusion method significantly improves the appearance of the game and makes it more pleasing to the eye. However, the differences between individual shading modes are not so easy to spot.
Summary
Ambient occlusion in some games can cause a significant drop in performance. Despite this, it is worth applying them, because it increases the impression of realism.
In the case of titles like The Witcher 3, where the improvement in the visual aspect is huge, and comes at the expense of a negligible drop in frames per second, HBAO+ activation seems to be mandatory.