Skip to content

FidelityFX Super Resolution

alt text

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 nameValueDescription
Particle animationChecked, UncheckedEnables or disables particle emission which is used to demonstrate the use of the Reactive mask.
MethodNative, FSRUsed to select the method of upscaling, either native resolution with no upscaling or upscaling using FSR.
FSR Version3.1.4, 2.3.3Select the FSR upscaler version to use.
Scale PresetNative AA (1.0x), Quality (1.5x), Balanced (1.7x), Performance (2x), Ultra Performance (3x), CustomSelect upscaling preset which represents the scaling factor per dimension from render resolution to display resolution.
Mip LOD Bias-5.0..0.0Used for choosing the amount of mipmap biasing applied for sampling textures during the G-Buffer pass.
Custom Scale1.0..3.0Allows to set a custom scaling factor when Scale Preset is set to ‘Custom’.
Letterbox size0.2..1.0Adds a black border around the frame when set to values below 1.
Reset UpscalingWhen clicked, sets the upscaling reset flag for one frame, simulating a discontinuous camera change.
Draw upscaler debug viewChecked, UncheckedToggles upscaler debug view. See the explanation below.
Reactive Mask ModeDisabled, Manual Reactive Mask Generation, Autogen FSR2 Helper FunctionUsed 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 MaskChecked, UncheckedToggles the use of the Transparency and Composition Mask.
RCAS SharpeningChecked, UncheckedToggles the use of RCAS sharpening.
Sharpness0.0..1.0Changes the amount of sharpening applied if RCAS is enabled.
Upscaler CB KeyfVelocity, fReactivenessScale, fShadingChangeScale, fAccumulationAddedPerFrame, fMinDisocclusionAccumulationSelect the upscaler tuning knob exposed in KeyValue API
Upscaler CB Value-1.0..2.0Calls KeyValue API to set upscaler tuning knob with this value when changed
Debug CheckerDisabled, Enabled. Set nullptr message callback, Enabled. Set Cauldron message callbackSelect 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 InterpolationChecked, UncheckedToggles frame generation.
Support Async ComputeChecked, UncheckedToggles async compute flag set during context creation.
Allow async computeChecked, UncheckedToggles use of async compute queue.
Use callbackChecked, UncheckedToggles use frame generation callback.
Use Distortion Field InputChecked, UncheckedToggles use distortionField texture.
Draw frame generation tear linesChecked, UncheckedToggles tearing indicators on the left and right sides of the window.
Draw frame generation pacing linesChecked, UncheckedToggles 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 indicatorsChecked, UncheckedToggles reset indicators at the top side of the window.
Draw frame generation debug viewChecked, UncheckedToggles frame generation debug view. See the explanation below.
Present interpolated onlyChecked, UncheckedWhen enabled, only interpolated frames are shown.
Reset Frame InterpolationWhen clicked, sets the frame generation reset flag for one frame, simulating a discontinuous camera change.
Simulate present skipWhen clicked, simulates skipping presentation of one frame by incrementing the frame ID by two.
UI Composition modeNo UI handling (not recommended), UiTexture, UiCallback, Pre-Ui BackbufferSelect method for rendering the user interface for generated frames.
DoubleBuffer UI resource in swapchainChecked, UncheckedToggles double-buffering of UI resource in the swapchain context.
Waitcallback Modenullptr, CAUDRON_LOG_DEBUG(waitCallback)If enabled, frame interpolation swapchain will call waitcallback at select places. For example, when resize window takes longer than 1ms.
Frame Pacing safetyMarginInMs0.0..1.0Changes frame interpolation swapchain pacing tuning safetyMarginInMs value.
Frame Pacing varianceFactor0.0..1.0Changes frame interpolation swapchain pacing tuning varianceFactor value.
Frame Pacing allowHybridSpinChecked, UncheckedToggles 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 units0.0..10.0Changes interpolation swapchain presenterthread sleep amount between checking if reached target QPC of completed frame.
Frame Pacing allowWiatForSingleObjectOnFenceChecked, UncheckedToggles 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:

Upscaler debug overlay

Frame generation debug view and markers

When the frame generation debug view is enabled, the following will be shown:

Frame interpolation debug overlay

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.

See also