Introducing Variable Rate Shading: A New Feature Microsoft DirectX 12






VRS is a new feature of Microsoft DirectX 12 and is supported on the 11th generation of Intel® graphics hardware. It enables you to trade off small amounts of quality, on selected parts of rendered content, in order to significantly reduce shading costs and improve FPS. Alternatively, you can increase the quality of a more prominent graphics feature by taking shading costs from something less visible.




This sample demonstrates how VRS can be used on areas obscured by an effect such as the Depth of Field to reduce their rendering cost with minimal or no quality loss and provides some general usage ideas and best practices.



This project is an example of using a Microsoft DirectX 12 feature called Variable Rate Shading, with the next generation of Intel® Graphics, to reduce shading costs and improve FPS.




Methodology / Approach




In this example, we are using VRS (https://microsoft.github.io/DirectX-Specs/d3d/VariableRateShading.html) to reduce shading costs in areas obscured by the Depth of Field effect. When VRS is applied, the quality loss is near-imperceptible. Because the DoF effect often blurs the results of expensive pixel shading, it is an ideal use case for VRS to recoup some of these shading costs.



As the objects come in and out of the area affected by the Depth of Field, the VRS Shading Rate used to render them is dynamically adjusted for optimal balance of performance gains versus quality loss.



This demo provides a way to interactively explore the VRS feature, letting the user directly observe and measure the visual changes as well as performance gains under various scenarios.




Technologies Used




Intel® Graphics, DirectX 12, Variable Rate Shading, Depth of Field