Gears Tactics - a dynamic turn-based strategy in the universe of one of the most famous gaming franchises - Gears of War . In addition, this is the first game that supports one of the main functions DirectX 12 Ultimate - Variable Rate Shading (VRS).

VRS allows Gears Tactics to achieve significant performance gains - up to 18.9%! - on a wide range of equipment without noticeable loss of image quality.

One of the main goals when developing Gears Tactics was to reach a wider audience of PCs by reducing the minimum system requirements. To do this, it was necessary to find new solutions to increase productivity, which would not require a significant decrease in graphics quality. One such solution was VRS.

In this article, we will take a closer look at the VRS tuning process to achieve the optimal balance between quality and performance. In particular, on which rendering passes to use it and with what parameters.

image

Since the main goal was to include the widest range of equipment in the implementation, we will only talk about the first level of VRS support (Tier 1), which allows you to set the shading rate for each object. For more information on VRS, you can read this post .

In the case of Gears Tactics , VRS does not extend to a support level higher than the first, so it was necessary to determine which rendering passes it could be used for (we will note that Gears Tactics was created on Unreal Engine 4 ), as well as formulate criteria when to reduce the shading rate - the size of the area of ​​pixels to which one-time rendering is applied. The higher it is (the highest is 1 × 1), the higher the accuracy of drawing and, accordingly, the higher the load on the GPU.

As it turned out, you can benefit from VRS at any stage of rendering, including some full-screen rendering.


Rendering pipeline rating


At first it seemed that the base rendering pass and the translucency pass should represent the greatest potential for optimization compared to the rest. Therefore, VRS was turned on for all draw calls in the base passage and in the translucency passage, but the latter caused too serious artifacts.

So, the next step was to evaluate which passes were the most promising for maximizing the benefits of VRS, and then test the shading rate on those passes and exclude those that left artifacts. So, passages using accurate pixel information have proven to be one of the main causes of these artifacts.

To find out which passages would prove to be the most effective, it was necessary to turn on VRS on all of them, and then narrow their number in PIX to those that showed themselves better than others.

Here they are:

  • Composition after lighting: Lighting for subsurface diffuser materials.
  • Filter Translucent Volumes: Smoothes translucent meshes within the volume to avoid overlap problems.
  • Light attenuation: Attenuation is the outer boundary when calculating the decay of a given light. This passage is repeated for shaded light sources, taking into account the calculated decline for the purpose of rendering shadow projections.
  • Light composition tasks (PreLighting): Responsible for the occlusion of ambient light.
  • Light Shaft Bloom: The effect of bloom (glow) that occurs when rendering light rays.
  • Screen Space Reflections: The process of reusing screen space information to create reflections.
  • Temporary anti-aliasing of screen space reflections (SSR Temporal AA): Smoothing the results of the passage through screen space reflections.
  • Direct Deferred Lighting: Responsible for rendering any direct light sources to the scene color buffer.

Then it was necessary to assess the severity of artifacts received in these passages due to VRS. The process turned out to be rather laborious, as Gears Tactics has several biomes with different types of weather conditions. You could get good results in the city during the day, but artifacts would come out in a sandy environment, or foliage, or at night in the rain.

The following passages showed a performance improvement with VRS enabled, but still had too many artifacts to be worth using:

  • Translucency;
  • Deferred Lighting;
  • Composition after lighting.

image
Example showing the image before and after Composition after lighting with a rough pixel size of 4 × 4

After eliminating these passes, work began on adjusting the shading rate based on other factors. First of all, dynamic objects and objects with a transparency mask were excluded.

Dynamic objects cast a fully dynamic shadow. Because of this, with VRS, they often lose important details and become more visible throughout the scene, as well as during movement. Applying VRS to a transparency mask also often led to a large loss of detail. And, since objects with a pixel depth offset, as it turned out, also did not display correctly, they were also excluded.

image
VRS was used on a set of masked objects, which led to an unacceptable loss of detail

Dynamic Techniques


So, we have compiled a good set of rendering passes to which VRS can be applied. However, the widespread use of the smallest shading rate (4 × 4 or 2 × 2 depending on the hardware support) in these passes will lead to a significant loss of quality. Therefore, the next step was the study of dynamic methods that could change the shading rate depending on the specific passage. As a result, they formed three. Each of them was used in key passages immediately before drawing the grid.

Here are these methods: determining the size of an object, masking the depth of field, and disguising the Fog of War.

Sizing an object


In this method, VRS is actively used on any grid that is extremely small compared to the gaming space. It is based on a quick check of the condition whether the value of the size of an individual polygon in the grid is below a given threshold. If so, the shading rate scales proportionally to that size.

Disguise depth of field


For most GPUs, the depth of field in Gears Tactics is turned off by default, but turned on during cut scenes. This method determines the degree of mesh blur after applying the depth of field in the post-processing process. And, since the details are intentionally eliminated at this stage, you can set a small shading rate on all previous key passes.

image
Grids highlighted in red due to the depth of field have the coarsest pixel size

The Fog of War Disguise


Gears Tactics uses the "fog of war" to hide part of the battlefield. It can also be used to mask lower shading rate. This technique determines how far a particular polygonal mesh is hidden by the "fog of war", and, starting from this, proportionally reduces the shading rate.

image
The intensity of VRS is growing in proportion to the intensity of the "fog of war"

Value for money


It turned out that using the combination of the methods described above, you can get more than 30% performance gain due to a significant reduction in shading rate. True, the loss of quality will be more noticeable than we would like. Therefore, the next step was to manually adjust the shading rate for each pass over several biomes and evaluate the performance gain and image quality after each change.

As a result, VRS received two levels. The “On” configuration has the least impact on image quality, provided that you disable VRS for some rendering passes and limit the reduction in shading rate. At the same time, setting “Performance” will lead to small compromises in picture quality in favor of increasing productivity using lower shading rate.

Here is another advantage of using the shading rate, which requires additional power. Pixel sizes greater than 2 require additional support for the shading rate from the hardware side, so any pass that uses a shading rate of 2 × 4, 4 × 2 or 4 × 4 is limited to the Performance level.

image

Test Results


Testing was conducted on Intel Gen 11 and Intel Xe, as well as on NVIDIA Turing. All supported features show similar performance gains.

Testable equipment


Operating System: Windows 10 Pro 64-bit (10.0, Build 18362) (18362.19h1_release.190318-1202)
Processor: Intel® Core (TM) i9-9900X CPU @ 3.50GHz (20 CPUs), ~ 3.5GHz
Memory: 98304 MB RAM
Video Card: NVIDIA GeForce RTX 2080 SUPER

All tests were carried out with the settings of the game Ultra with a resolution of 4K

ITKarma picture

ITKarma picture

ITKarma picture

ITKarma picture

image
All Techniques with VRS On Settings

image
Enabling All Techniques with VRS Performance

ITKarma picture


VRS Extension


You can get additional benefits by expanding the VRS application methods described here.

Further masking methods


Additional masking techniques can increase the effectiveness of VRS or reduce the number of artifacts. These methods may vary depending on when the areas are shaded or blurred during the game:

  • Motion Blur : Cameras that use fast-moving scenes can easily use VRS on most meshes with motion blur enabled.
  • Particles: Polygonal meshes hidden behind a thick layer of particles can be used to mask high-intensity VRS.

Dynamic VRS


As with dynamic resolution scaling, a possible improvement here is VRS scaling depending on the frame rate in order to minimize the time required to use it. This is a separate tracking system that may require adjustment at different frequencies to avoid amplification of artifacts.

Dynamic Resolution Scaling (DRS)


Gears Tactics uses both VRS and DRS to optimize, but these features may not have very good compatibility. This is due to the fact that when DRS changes the resolution scale, the VRS artifacts also change. This leads to the fact that the player either finds out about VRS artifacts, and about changing the resolution at once, or both of them go unnoticed. One way to use both functions at the same time can be to monitor the coefficient of change of DRS and turn off the use of VRS until it stabilizes.

Instead of a conclusion


Skillful use of the Tier 1 VRS allows you to achieve significant performance gains on a wide range of equipment with minimal impact on image quality.

Source