How to use the AMD FidelityFX Super Resolution 2 (FSR 2) Unreal Engine plugin

Introduction

AMD FidelityFX™ Super Resolution 2 (FSR 2) is our open source temporal upscaling solution. FSR 2 uses cutting-edge temporal algorithms to reconstruct fine geometric and texture detail, producing anti-aliased output from aliased input.

This package also includes the FSR2MovieRenderPipeline plugin which enables use of FSR 2 to accelerate rendering when using the Unreal Movie Render Queue.

FSR2’s Recommendations and Known Issues must be understood and addressed per-project to achieve optimal quality. See the respective section in this guide.

Latest version: v2.1.2 (updated 19th October 2022)

FSR 2.1 Unreal Engine patches

Don’t miss our very detailed blog series which explains what the patches which come supplied with the plugin are, how to install them, and how use them to your benefit. You can also learn about the changes you can make to get similar benefits without using the patches.

Known issues

World-position-offset on static objects

Static objects that use a material with World-Position-Offset do not generate motion vectors. This affects FSR2’s ability to correctly upscale such materials and results in blurring/ghosting of the affected objects.

One option is to enable the console-variables r.BasePassOutputsVelocity and r. BasePassForceOutputsVelocity then disable the console variable r.SelectiveBasePassOutputs which renders velocity for all objects during the base-pass.

For cases where this is too expensive and changing content is infeasible follow the installation instructions to install the correct version of the ‘ImproveStaticWPO’ engine patch to avoid this issue or ensure that all objects using a WPO material are set to Stationary or Movable. When changing the content grass layers attached to Landscape actors require a new console variable r.FidelityFX.FSR2.ForceLandscapeHISMMobility be enabled, this will change their mobility to Stationary so they render motion vectors.

Animated opaque materials

Animated opaque materials which don’t generate motion vectors for the animated content, such as in-world video screens, may also blur or ghost when obscured by static geometry. This can be reduced by ensuring such materials write into the Reactive Mask generated in the plugin.

For the Deferred Renderer this can be achieved by selecting a Shading Model for the Reactive Shading Model option in the FSR2 section of the project settings or using the r.FidelityFX.FSR2.ReactiveMaskForceReactiveMaterialValue console variable. Materials that use this Shading Model will be treated as reactive. This means that when this Shading Model is selected in the Material Editor that material will write either the value of the CustomData0.x channel, when exposed by the Shading Model, or the value of the console-variable r.FidelityFX.FSR2.ReactiveMaskForceReactiveMaterialValue provided it is set to a value greater than 0. Using r.FidelityFX.FSR2.ReactiveMaskForceReactiveMaterialValue overrides any material specific reactivity specified in the CustomData0.x channel.

Where selecting an existing shading model is unsuitable follow the installation instructions to install the correct version of the ‘LitReactiveShadingModel’ engine patch which adds a new LitReactive shading model that can be used specifically for this purpose.

This problem cannot currently be resolved in the Forward Renderer where the Shading Model cannot be determined by the plugin.

PIX and RenderDoc issues

The native FSR2 backends used within FSR2 plugin graphics capture tools such as PIX and RenderDoc may be less stable. Disabling the native backend ( r.FidelityFX.FSR2.UseNativeDX12 or r.FidelityFX.FSR2.UseNativeVulkan ) and using the RHI-based backend may allow the capture tool to replay captures more reliably.

UE4 post-processing volume screen-percentage overrides

UE4, developers should be aware that FSR2’s quality mode (when enabled) will determine the screen-percentage and ignores any screen-percentage override present in a post-processing volume. This will cause different visual and performance results. 

Recommendations

Optimizing translucency appearance

While the default settings for the FSR2 Reactive Mask should generate reasonable results it is important that developers are aware that the appearance can be altered via the r.FidelityFX.FSR2.ReactiveMask... console variables. Tuning these variables to suit the content may be necessary to optimise visual results.

Translucent skyboxes and background planes

When using a skybox or a distant background plane it is beneficial for this to be rendered with the Opaque or Masked shading model when using FSR2. If these are rendered with the Translucent shading model they will contribute to the FSR2 translucency and reactive masks, which can result in unnecessary artefacts. This is especially noticeable when other translucent materials are rendered over the top of the skybox/background plane and the camera moves. This occurs because the plugin cannot distinguish the purpose of individual translucent materials, so they are all treated the same. 

To address this issue, the FSR2 plugin assumes that a translucent skybox or background-plane is used and will fade out translucency contribution based on reconstructed distance from the camera. This will cut-out all translucency rendered over distant opaque geometry and can be controlled with the r.FidelityFX.FSR2.ReactiveMaskTranslucencyMaxDistance console variable. 

When using an opaque skybox or backplane, adjust the r.FidelityFX.FSR2.ReactiveMaskTranslucencyMaxDistance console variable to avoid translucency cut-outs. 

Hair and dither effects

FSR2 does not smooth dither effects in the way other upscalers do. They are retained as thin features which may not be intentional. To avoid this, especially with hair, enable the r.FidelityFX.FSR2.DeDither console variable which attempts to smooth dither effects prior to FSR2 upscaling.

Setup

Supported Unreal Engine versions

  • The FSR 2 plugin is intended for Unreal Engine 4.26.2* or later, including Unreal Engine 5.
  • The FSR2MovieRenderPipeline plugin is intended for Unreal Engine 4.27.2* or later, including Unreal Engine 5.

*If you are not a registered Unreal Engine developer, you will need to follow these instructions to register for access to this link.

Patch the engine

For optimal quality it is necessary to use Unreal Engine from source code and apply source code patches.

  1. To improve FSR2’s handling of World-Position-Offset materials applied to Static objects, use git apply [VERS]-ImproveStaticWPO.patch where [VERS] should be the engine version in use.
  2. To improve FSR2’s handling of animated opaque materials, use git apply [VERS]-LitReactiveShadingModel.patch where [VERS] should be the engine version in use.

Installation procedure

To install the plugin:

  1. Locate the Engine/Plugins directory of your Unreal Engine installation.
  2. Extract the contents of the FSR2.zip file.
  3. Select the sub-folder that corresponds to the Unreal Engine version to be used.
  4. Place the FSR2 folder within your Unreal Engine source tree at: Engine/Plugins/Runtime/AMD (for UE4) or Engine/Plugins/Marketplace (for UE5)
    1. (Optional) Place the FSR2MovieRenderPipeline folder within your Unreal Engine source tree at: Engine/Plugins/Runtime/AMD. Only available from Unreal Engine 4.27.2 and later.
  5. Open your Unreal Engine project.
  6. Navigate to Edit > Plugins in the Unreal Engine toolbar.
  7. Within the Plugins dialog:
    1. Ensure that All is selected on the left side.
    2. Type ‘fsr’ into the search box in the top right corner.
    3. Select the Enabled checkbox for the FSR 2.1 plugin.
      1. (Optional) Select the Enabled checkbox for the FSR2MovieRenderPipeline
        plugin.
    4. When prompted, click Restart Now to apply changes, and restart Unreal Engine.
FSR2 UE Plugin

Plugin configuration

Usage

Temporal Upsampling must be enabled in the Project Settings > Rendering window, accessed via Edit > Project Settings in the Unreal Engine toolbar, or via the console variable r.TemporalAA.Upsampling . 

Unreal Engine Rendering

Quality modes

FSR 2 can be enabled or disabled via the Enabled option in the Project Settings > FidelityFX Super Resolution 2.1 settings window, or with the console variable r.FidelityFX.FSR2.Enabled in the configuration files

The plugin will use specific quality modes specified via the Console Variable r.FidelityFX.FSR2.QualityMode overriding r.ScreenPercentage .

The exposed modes are:

  • Quality (1.5x): r.FidelityFX.FSR2.QualityMode 1
    Provides an image quality equal or superior to native rendering with a significant performance gain.
  • Balanced (1.7x): r.FidelityFX.FSR2.QualityMode 2
    Offers an ideal compromise between image quality and performance gains.
  • Performance (2.0x): r.FidelityFX.FSR2.QualityMode 3
    Provides an image quality similar to native rendering with a major performance gain.
  • Ultra Performance (3.0x): r.FidelityFX.FSR2.QualityMode 4
    Provides the highest performance gain while still maintaining an image quality representative of native rendering.
UE FSR2 Plugin Settings

Integration instructions

RCAS

FidelityFX Super Resolution 2 contains a built-in sharpening pass called Robust Contrast Adaptive Sharpening (RCAS) that can be configured through the console variable r.FidelityFX.FSR2.Sharpness . This is disabled by default.  If your project has already integrated FidelityFX-CAS, it may be necessary to disable FidelityFX CAS – including any in-game menu options – while r.FidelityFX.FSR2.Sharpness is enabled to prevent over-sharpening your final renders, and improve integration results.

World-position offset

In order for FSR2 to process materials with World Position Offset and/or World Displacement correctly the r.VertexDeformationOutputsVelocity (UE4) or r.Velocity.EnableVertexDeformation (UE5) option must be enabled. The r.FidelityFX.FSR2.ForceVertexDeformationOutputsVelocity setting is enabled by default and when enabled FSR2 will force r.VertexDeformationOutputsVelocity (UE4) or r.Velocity.EnableVertexDeformation (UE5) on.

This option also forces on the console-variable r.BasePassForceOutputsVelocity to ensure that all objects render velocity during the base-pass when a project enables r.BasePassOutputsVelocity .

For grass layers attached to Landscape actors it is also necessary to enable a new console variable r.FidelityFX.FSR2.ForceLandscapeHISMMobility to change their mobility to Stationary so they render motion vectors.

See the Known Issues and Setup sections for more details about an Engine patch that can improve visual quality in some circumstances.

Reactive mask and experimental ScreenSpace Reflection Denoiser

When r.FidelityFX.FSR2.CreateReactiveMask is enabled the FSR2 plugin forces r.SSR.ExperimentalDenoiser to 1 in order to capture the Screen Space Reflections. To handle this, the initial value of r.SSR.ExperimentalDenoiser will be applied to r.FidelityFX.FSR2.UseSSRExperimentalDenoiser . Subsequent changes to the value of r.FidelityFX.FSR2.UseSSRExperimentalDenoiser will override this. 

Multiple upscalers

To switch to or from FSR2 to another temporal upscaler, always ensure that only one external temporal upscaler is enabled at a time. Disable the current upscaler before enabling the desired upscaler.

Other configurations

Movie render pipeline plugin

The FSR2MovieRenderPipeline plugin once enabled allows using FSR2 to accelerate rendering of Sequencer cinematics using Unreal’s Movie Render Queue.

To use the plugin:

  1. Open your Unreal project.
  2. Open a Sequencer cinematic through the Editor. 
  3. Select the movie output in the toolbar.

4.  Click on Unsaved Config to open the settings for the Movie Render Queue.

Unsaved configuration

5. Select the + Setting option and enable Fidelity FX Super Resolution 2.1 Settings.

FSR2 UE settings

6. Then select the new Fidelity FX Super Resolution 2.1 Settings in the list and choose the desired quality mode for rendering.

UE FSR2 quality setting

7. Click Accept and then Render (Local).

8. The output will be rendered using FSR 2 to upscale the output to the target resolution.

Get the Unreal Engine FSR 2 plugins now!

The package linked below contains all three plugins for UE 4.26, UE 4.27, and UE 5.0. [~340MB]

The package linked above will always provide the most recently available plugins.

Learn more about FSR and Unreal Engine

Unreal Engine

Develop for Unreal Engine on AMD hardware with our plugin, performance and feature patches, including FidelityFX support.

Release notes

  • Update the FSR2 code to version 2.1.
  • Fixed incorrect rendering & crashes with Split-Screen.
  • Resolved a crash when changing Scalibility Level in the Editor.
  • Resolved a crash when enabling visualisation modes that disable upsampling.
  • Resolved a crash when using Shader Model 6 in Unreal Engine 5.
  • Resolved a crash opening the Unreal Editor when using the Vulkan RHI.
  • Fixed sampling from reduced resolution ScreenSpace Reflections & Separate Translucency.
  • Fixed re-enabling World-Position-Offset console variables when toggling FSR2 on & off.
  • Added an optional de-dither pass to improve FSR2’s handling of dithered materials, especially Hair.
  • Disabled FP16 in the RCAS pass to prevent incorrect rendering.
  • Added an option to treat a shading model as reactive & use either CustomData0.x or the value of r.FidelityFX.FSR2.ReactiveMaskForceReactiveMaterialValue as the reactive mask value.
  • Added an option FidelityFX.FSR2.ForceLandscapeHISMMobility to force the mobility of Hierarchical Instanced Static Mesh components attached to Landscapes to Stationary so they render motion vectors.
  • Added an Engine patch to improve rendering of ‘Static’ objects that use a material with World-Position-Offset.
  • Added an Engine patch which adds the Lit-Reactive ShadingModel that can be used to pass a reactivity value to write into the Reactive Mask for animated materials such as video screens.
  • Remove an unnecessary RHI command flush that reduced CPU performance.
  • Resolved a crash in Unreal Engine 5.
  • Initial release.
GPUOpen

GPUOpen

The home for games and graphics developers. Discover how our open source tools, SDKs, and effects can help you find your best graphics performance. Learn tips and tricks with our extensive tutorials and samples.

Enjoy this blog post? If you found it useful, why not share it with other game developers?

You may also like...

Getting started: our software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

Getting started: development and performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

If slide decks are what you’re after, you’ll find 100+ of our finest presentations here. Plus there’s a handy list of our product manuals!

Developer guides

Browse our developer guides, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan, DirectX, UE4, and lots more.

Words not enough? How about pictures? How about moving pictures? We have some amazing videos to share with you!

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

Product Blogs

Our handy product blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

Publications

Discover our published publications.