FidelityFX Super Resolution
This sample demonstrates the use of FidelityFX Super Resolution 3.1.4 for upscaling and frame generation.
For details on the underlying algorithms you can refer to the per-technique documentation for FSR3 upscaling and frame interpolation .
Requirements
-
Windows
-
DirectX(R)12
-
Vulkan(R)
UI elements
The sample contains various UI elements to help you explore the techniques it demonstrates. The table below summarises the UI elements and what they control within the sample.
Element name |
Value |
Description |
---|---|---|
Particle animation |
|
Enables or disables particle emission which is used to demonstrate the use of the Reactive mask. |
Method |
|
Used to select the method of upscaling, either native resolution with no upscaling or upscaling using FSR. |
FSR Version |
|
Select the FSR upscaler version to use. |
Scale Preset |
|
Select upscaling preset which represents the scaling factor per dimension from render resolution to display resolution. |
Mip LOD Bias |
|
Used for choosing the amount of mipmap biasing applied for sampling textures during the G-Buffer pass. |
Custom Scale |
|
Allows to set a custom scaling factor when Scale Preset is set to ‘Custom’. |
Letterbox size |
|
Adds a black border around the frame when set to values below 1. |
Reset Upscaling |
 |
When clicked, sets the upscaling reset flag for one frame, simulating a discontinuous camera change. |
Draw upscaler debug view |
|
Toggles upscaler debug view. See the explanation below. |
Reactive Mask Mode |
|
Used to select the method of generating the Reactive mask. Either disables it completely, generates it manually by drawing transparent objects or generates it automatically using the helper function provided by FSR 2. |
Use Transparency and Composition Mask |
|
Toggles the use of the Transparency and Composition Mask. |
RCAS Sharpening |
|
Toggles the use of RCAS sharpening. |
Sharpness |
|
Changes the amount of sharpening applied if RCAS is enabled. |
Upscaler CB Key |
|
Select the upscaler tuning knob exposed in KeyValue API |
Upscaler CB Value |
|
Calls KeyValue API to set upscaler tuning knob with this value when changed |
Debug Checker |
|
Select between debug checker behaviors for all ffx-api contexts. Whether debug checker is disabled, enabled and output message to debugger TTY, or enabled and output message to application’s callback. Will recreate context when flag bit FFX_FSR3UPSCALER_ENABLE_DEBUG_CHECKING or FFX_FRAMEGENERATION_ENABLE_DEBUG_CHECKING changes. |
Frame Interpolation |
|
Toggles frame generation. |
Support Async Compute |
|
Toggles async compute flag set during context creation. |
Allow async compute |
|
Toggles use of async compute queue. |
Use callback |
|
Toggles use frame generation callback. |
Use Distortion Field Input |
|
Toggles use |
Draw frame generation tear lines |
|
Toggles tearing indicators on the left and right sides of the window. |
Draw frame generation pacing lines |
|
Toggles 2 vertical lines on the left of the window. Left most line alternate between green & magenta. The other line alternate between black & white. If the pacing is done properly, user should see two grey lines. |
Draw frame generation reset indicators |
|
Toggles reset indicators at the top side of the window. |
Draw frame generation debug view |
|
Toggles frame generation debug view. See the explanation below. |
Present interpolated only |
|
When enabled, only interpolated frames are shown. |
Reset Frame Interpolation |
 |
When clicked, sets the frame generation reset flag for one frame, simulating a discontinuous camera change. |
Simulate present skip |
 |
When clicked, simulates skipping presentation of one frame by incrementing the frame ID by two. |
UI Composition mode |
|
Select method for rendering the user interface for generated frames. |
DoubleBuffer UI resource in swapchain |
|
Toggles double-buffering of UI resource in the swapchain context. |
Waitcallback Mode |
|
If enabled, frame interpolation swapchain will call waitcallback at select places. For example, when resize window takes longer than 1ms. |
Frame Pacing safetyMarginInMs |
|
Changes frame interpolation swapchain pacing tuning |
Frame Pacing varianceFactor |
|
Changes frame interpolation swapchain pacing tuning |
Frame Pacing allowHybridSpin |
|
Toggles whether frame interpolation swapchain presenterthread will hybrid spin instead of busy spin when waiting for target QPC of before present the frame. |
Frame Pacing hybridSpinTime in timer resolution units |
|
Changes interpolation swapchain presenterthread sleep amount between checking if reached target QPC of completed frame. |
Frame Pacing allowWiatForSingleObjectOnFence |
|
Toggles whether frame interpolation swapchain interpolationThread will use WaitForSingleObject instead of busy spin waiting for interpolationFence |
Upscaler debug view
When the upscaler debug view is enabled, the following will be shown:
Frame generation debug view and markers
When the frame generation debug view is enabled, the following will be shown:
In addition to the debug view, several markers can be enabled that may appear at the sides and top of the window.
If tear lines are enabled, a green bar will be drawn on the left of every generated frame and a color changing bar on the right of every generated frame. This will assist visualizing if interpolated frames are getting presented and if the frames are presented with tearing enabled.
If reset indicators are enabled, a red bar will appear at the top of the screen if frame generation is manually reset and a blue bar if the optical flow algorithm detects a discontinuous camera change.
Setting up FidelityFX Super Resolution 3
The sample contains a dedicated Render Module for FSR which creates the contexts and controls their lifetime. See the FidelityFX Super Resolution 3.1 Overview and Integration document for more information.
Sample controls and configurations
For sample controls, configuration, and FidelityFX Cauldron Framework UI element details, see Running the samples .