Games are pushing GPUs to render more pixels, faster, to deliver those amazing visuals we all want at ultra-high resolutions and framerates.
With the Turing architecture, we support a new feature called Variable Rate Shading (VRS), which is broadly accessible to developers since it’s built into DirectX 12, Vulkan, OpenGL, and DirectX 11 (NvAPI). With VRS, portions of the screen can be rendered a different levels of detail, focusing your GPU on the most important parts of the scene.
Using VRS, we created NVIDIA Adaptive Shading (NAS), which combines two forms of VRS into one content aware option, as in MachineGames’ Wolfenstein: Youngblood. In this fast first-person shooter, it can accelerate performance by up to 15%, with no perceivable visual quality loss.
Below, we show an image quality comparison between NAS (performance mode) and a lower render resolution across the entire scene. Both techniques shade a similar number of pixels on screen, while the NAS image looks better thanks to a more optimal shading rate distribution.
In the shading rate visualization image, tiles in blue means the shading rate is 2x lower, green 4x lower, and yellow 8x lower. The majority of tiles in this example receive 8x reduction in shading rate
Reference vs. NAS (performance) and NAS vs. uniform 2x2 low-res rendering
NAS is comprised of two adaptive shading techniques: Content Adaptive Shading and Motion Adaptive Shading.
These techniques intelligently reduce the shading rate without affecting image quality. In a nutshell, Content Adaptive Shading predicts the impact of reduced-rate shading, and only does it if it’s expected to be imperceptible. Thanks to the VRS feature on Turing GPUs, the shading rate can be set to vary independently on each 16x16 screen tile, allowing a fine grained distribution of shading budget over the tens of thousands of tiles on the entire screen.
Generally speaking, the less contrast and variation the objects in the scene have, the lower the shading rate can be without reducing visual quality. To give gamers the freedom to customize their experience, options are available to fine tune based on their liking.
Motion Adaptive Shading takes advantage of motion blur-type effects to reduce the shading rate when moving and turning in game.
An inspiration for Motion Adaptive Shading is a phenomenon called LCD persistence blur. The animation below compares how we see a moving object in real world versus on the screen. Because the display can only refresh at fixed intervals, the displayed object has a jerky motion. Our eyes are still trying to follow the object in a linear motion. However, on our retina, the image is quickly shaking, leading to a blurry perceived image. And aside from display blur, many game engines also add motion blur to the rendering, essentially doubling the blurring effect.
LCD persistence blur and motion blur hide image imperfections caused by lowered shading rates. Below, the three images on the left show full, half and quarter rate shading in the X direction without motion. After adding a mild motion blur (middle column), the half and full rate images look almost identical. With an even wider blur (right column), all three images look the same, except a few edges with high contrast.
Notice that the blur does not blindly hide every level of image imperfections, but instead scales the loss down proportionally. We use signal processing theories and run simulations to make sure we apply the best scaling factors at every possible motion speed.
So, with MAS, we can reduce the shading rate of blurred game elements without your eyes noticing any difference, giving you faster performance.
NAS in MachineGames’ Wolfenstein: Youngblood offers three quality presets: Quality, Balanced, and Performance. Each has different trade-offs in terms of quality and performance.
In general, there is hardly any perceptible quality loss when using Balanced or Quality. With the more aggressive Performance mode, a trained eye may see differences in a few spots, but most likely only in static image comparisons.
With a debug visualization enabled, we demonstrate the distribution of shading rates used by the three presets. In this visualization, tiles that are not colored receive full rate shading. Tiles in blue means the shading rate is 2x lower, green 4x lower, and yellow 8x lower. With the more aggressive Performance mode, the majority of screen tiles benefit from 8x reduction in shading cost.
The table below shows the percentage improvements to framerates in two scenes. All numbers are measured in stationary scenes, rendering at 4K (3840x2160) on a GeForce RTX 2080 Ti.
Scene |
NAS Off |
Quality |
Balanced |
Performance |
Garage |
98.4 |
104.4 (+6%) |
107.2 (+9%) |
110.8 (+13%) |
Interior |
98.7 |
106.9 (+8%) |
110.7 (+12%) |
115.5 (+17%) |
More images and detailed comparison can be found in our comprehensive Wolfenstein: Youngblood Graphics and Performance Guide.
NAS can be enabled on modern game engines to leverage the VRS feature on Turing GPUs - giving gamers higher FPS at barely any visual quality loss. If you are interested in learning more about the technical details of NAS and VRS, check out our GDC presentation and I3D 2019 paper.
Comments