You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhaced the VRS implementation to support foveated rendering
- The shader was extended with an option to select between the default algorithm based on luminance and motion vectors, foveated rendering, or a combination.
- The `FfxVrsDispatchDescription` parameters were extended accordingly
- The sample now has the option to select between the different vrs image generation algorithms.
Signed-off-by: Kenneth Funes <[email protected]>
|**ShadingRateImage Enabled**|`Checked/Unchecked`| Enable/Disable Tier 2 VRS control image. |
26
26
|**ShadingRateImage Combiner**|`Checked/Unchecked`| The options for each combiner are: passthrough the previous state (i.e. disable the current stage), override (ignore previous stages), min, max and sum. |
27
+
|**VRS Algorithm**|`Luminance and Motion Vectors, Foveated Rendering, Combined (Max)`| The technique used to generate the shading rate image. |
27
28
|**VRS variance Threshold**|`0.0 - 1.0`| Defines a value against which luminance variance gets compared in the compute shader generating the VRS image. |
28
29
|**VRS Motion Factor**|`0.0 - 1.0`| Sets a factor by which the motion of the pixel since the last frame gets scaled to modify the shading rate. |
29
30
|**ShadingRateImage Overlay**|`Checked/Unchecked`| Enable/Disable ShadingRateImage overlay, a debug image over the rendered scene. |
30
31
31
32
<h2>Setting up Variable Shading</h2>
32
33
33
-
The Variable Shading compute shader takes as input the linear color buffer produced by the geometry rendering passes, and motion vectors buffer produced before geometry rendering passes. Final VRS control image is written to output buffer passed from setup.
34
+
The Variable Shading compute shader takes as input the linear color buffer produced by the geometry rendering passes, and motion vectors buffer produced before geometry rendering passes. It also takes as input the center and radii for the foveated rendering regions. Final VRS control image is written to output buffer passed from setup.
34
35
35
36
Include the interface for the backend of the VRS API.
Copy file name to clipboardExpand all lines: docs/techniques/variable-shading.md
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ FidelityFX Variable Shading (VRS) provides a similar way to reduce the number of
12
12
13
13
One way to think about how VRS works is to think of MSAA: if a 4K frame is rendered with 2x2 VRS for everything, the required computational power and the final quality of the image would be comparable to rendering a 1080p image with 4x MSAA enabled. However, VRS provides additional features to enable more fine-grained control over which parts of the frame should get rendered with lower resolution.
14
14
15
+
FidelityFX Variable Shading (VRS) also gives the option to implement Foveated Rendering by significanly reducing the number of pixel shading executions at the outer periphery of where the user is looking, taking advantage of the user not noticing the loss of visual quality in such regions. This can thus be paired with an eye tracker, whether built in a VR headset, a dedicated hardware or a webcam based software.
16
+
15
17
<h2>Implementing Variable Shading</h2>
16
18
17
19
<h3>Cases allowing VRS</h3>
@@ -24,8 +26,9 @@ image:
24
26
- Some objects may get distorted or blurred by being behind haze or semi-transparent objects like water or frosted glass.
25
27
- Some objects might be known to have little detail variance (such as rendering for toon shaded games) or due to being in very dark parts of the scene (e.g. the unlit or shadowed parts of objects in scenes with little ambient light).
26
28
- In fast moving scenes, high framerate and low input lag are important, but small details are less likely to get noticed by the player, so aggressively using VRS can help to achieve the performance goals.
29
+
- When using an eye tracking device, one can establish where the user is looking, and can decrease the visual quality away from that area without being noticeable.
27
30
28
-
In addition to the cases mentioned above, some pixels might be known to be of little interest to the player, either through eye-tracking (foveated rendering) or other systems, or because the game design aims to steer the focus of the player to certain parts of the screen. As an example, the game might choose to reduce the shading rate on the background geometry but make sure all enemies are rendered at highest quality.
31
+
In addition to the cases mentioned above, some pixels might be known to be of little interest to the player, either through eye-tracking or other systems, or because the game design aims to steer the focus of the player to certain parts of the screen. As an example, the game might choose to reduce the shading rate on the background geometry but make sure all enemies are rendered at highest quality.
29
32
30
33
Due to saving computational power by focusing usage of GPU resources where it matters most, VRS can be used to make sure target frame times are achieved (similar to dynamic resolution scaling but with more fine-grained control over where detail needs to be preserved), as well as for power saving on portable devices without noticeably sacrificing image quality.
0 commit comments