Screen space ambient occlusion (SSAO) is a popular effect used in real-time rendering to produce small-scale ambient effects and contact shadow effects. It is used in many modern games, typically taking up 5% to 10% of the GPU frame time.
Until the 2018 launch of Battle for Azeroth*, SSAO had been disabled in World of Warcraft* (WoW*) by default on all mainstream platform settings (Graphics Quality below 7), due to insufficient compute power on these platforms. During the game’s development, Blizzard Entertainment* and Intel worked together to implement various low-level graphics optimizations providing additional performance headroom. This allowed for exploring increases to the visual quality of the game, all while maintaining the same framerate. In doing so, they investigated a new scalable SSAO effect: Adaptive Screen Space Ambient Occlusion (or ASSAO). This article focuses on the integration of ASSAO in the WoW engine.
An article detailing the implementation is featured in the GPU Zen: Advanced Rendering Techniques book and the full implementation is furthermore available in an easy-to-integrate package on GitHub*, under the MIT license. For more details about the technique, see Adaptive Screen Space Ambient Occlusion.
Figure 1. Left side of image shows ASSAO turned off, right side shows ASSAO at the highest setting. The bottom section of red and orange boxes shows the ambient occlusion (AO) visualization at various settings that WoW* offers in-game. Settings are shown from left to right: Low, Good, High, Ultra.
ASSAO was originally designed with adaptiveness and customization in mind. The goal was to enable great graphics quality across the wide range of GPU platforms, including integrated GPUs. ASSAO has many knobs that help in trading off graphics quality and performance to achieve scalability. These include the number of depth texture samples, the presence of MIP levels for the depth texture, and the presence and quality of an edge-aware blur operation. This scaling is one of the reasons the WoW team decided to use the technique as it could effectively target their wide range of supported platforms.
The original prototype integration into WoW, together with debugging the effect, was done in approximately one day. Blizzard and Intel engineers grabbed the sample code from GitHub requiring only three files from the sample project:
The fully, self-contained effect enabled the team to get correct rendering by following these steps:
SSAO_Effect::CreateInstance(..)function at initialization time.
ASSAO_Effect::Draw(..)function once per frame in the pipeline alongside the previous ambient occlusion (AO) effect. This requires passing the DirectX 3D* device context, depth and normal buffer resource views, as well as the output render target view.
From there, the WoW team worked to productize the changes, porting the effect to multiple platforms and ensuring the technique could be brought to as many users as possible. While merging the shader and graphics code for the technique, Blizzard was able to harden some of their internal code, adding more robust support for rendering to MIP levels required by the higher settings of ASSAO. They also had to handle shader-based limitations across various supported graphics APIs. For example, DirectX* Shader Model 4.0 and earlier has no support for Unordered Access Views and limited support for the gather operation. There are also some buffer types used in the original ASSAO sample code that were not directly compatible with other shader languages like Metal*. WoW developers were able to work around these issues with various approaches, either making minor algorithm changes or limiting the technique on some platforms.
The following table represents how Blizzard was able to map the ASSAO settings to their in-game settings. With each higher setting, the effect quality improves. The performance at each setting is not discussed in this article as the settings are intended to map to different classes of graphics hardware. Each setting is intended to fit ASSAO into a fixed frame budget for AO, which is achievable due to the technique’s scalability.
Table 1. ASSAO performance settings mapped to their WoW in-game settings
|WoW* AO Quality||ASSAO Quality Level
|Sample Count||Depth MIPs||Edge-aware Blur|
(depth + normals)
|Ultra||Very High (3)||Adaptive
(depth + normals)
Figure 2. This figure shows the effect at various settings (from off at left to highest settings at right) and how the final content will appear. In the breakout, the top row shows AO effect as applied to the scene while the bottom row shows AO only.
Graphics-related game features cannot be shipped without the approval of the artists, but in this case, the Blizzard artists were quite convinced by ASSAO. The algorithm allows them to easily tweak the effect with non-performance-impacting factors such as the effect radius, strength and power, while additionally handling corner cases such as bleeding extremely well.
Figure 3. Adaptive SSAO at the various in-game settings in WoW. The AO effect gets sharper and more defined with each higher setting.
Through collaboration, Blizzard helped improve scalability of their gaming experience, while Intel was able improve and showcase a useful solution for the greater industry. To implement this technique in your project, see Adaptive Screen Space Ambient Occlusion.
Strugar, Filip. "Scalable Adaptive SSAO", GPU Zen: Advanced Rendering Techniques, edited by Wolfgang Engel, Black Cat Publishing, 2017, pp. 183-200.
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804