Microsoft Announces Variable Rate Shading for DirectX 12
Subject: Graphics Cards | March 19, 2019 - 08:29 PM | Scott Michaud
Tagged: microsoft, DirectX 12, turing, nvidia
To align with the Game Developers Conference, GDC 2019, Microsoft has announced Variable Rate Shading for DirectX 12. This feature increases performance by allowing the GPU to lower its shading resolution for specific parts of the scene (without the developer doing explicit, render texture-based tricks).
An NVIDIA speech from SIGGRAPH 2018 (last August)
The feature is divided into three parts:
- Lowering the resolution of specific draw calls (tier 1)
- Lowering the resolution within a draw call by using an image mask (tier 2)
- Lowering the resolution within a draw call per primitive (ex: triangle) (tier 2)
The last two points are tagged as “tier 2” because they can reduce the workload within a single draw call, which is an item of work that is sent to the GPU. A typical draw call for a 3D engine is a set of triangles (vertices and indices) paired with a material (a shader program, textures, and properties). While it is sometimes useful to lower the resolution for particularly complex draw calls that take up a lot of screen space but whose output is also relatively low detail, such as water, there are real benefits to being more granular.
The second part, an image mask, allows detail to be reduced for certain areas of the screen. This can be useful in several situations:
- The edges of a VR field of view
- Anywhere that will be brutalized by a blur or distortion effect
- Objects behind some translucent overlays
- Even negating a tier 1-optimized section to re-add quality where needed
The latter example was the one that Microsoft focused on with their blog. Unfortunately, I am struggling to figure out what specifically is going on, because the changes that I see (ex: the coral reef, fish, and dirt) don’t line up with their red/blue visualizer. The claim is that they use an edge detection algorithm to force high-frequency shading where there would be high-frequency detail.
Right side reduces shading by 75% for terrain and water
Right side reclaims some lost fidelity based on edge detection algorithm
Visualization of where shading complexity is spent.
(Red is per-pixel. Blue is 1 shade per 2x2 block.)
Images Source: Firaxis via Microsoft
Microsoft claims that this feature will only be available for DirectX 12. That said, NVIDIA, when Turing launched, claims that Variable Rate Shading will be available for DirectX 11, DirectX 12, Vulkan, and OpenGL. I’m not sure what’s different between Microsoft’s implementation that lets them separate it from NVIDIA’s extension.
Microsoft will have good tools support, however. They claim that their PIX for Windows performance analysis tool will support this feature on Day 1.