What is this blog post series about?
When we made FSR 2.1 available, we also updated our FSR 2 Unreal Engine plugin. This update not only brings significant improvements to the plugin generally, but we’ve also provided two patches with the package which can increase visual fidelity. FSR 2.2 further improves the plugin and adds Unreal Engine 5.1 support.
This five part blog post series – this is part 3 – highlights the issues these patches address, and how you can use them in your own Unreal Engine projects.
Part 1 – Improving foliage appearance: Introduction and using the base pass for velocity generation.
Part 2 – Improving foliage appearance: Improvements via content changes.
→ Part 3 – Improving foliage appearance: Applying the ImproveStaticWPO patch.
Part 4 – Making materials reactive: How to make a specific shading model write to the reactive mask.
Part 5 – Making materials reactive: Applying the LitReactiveShadingModel patch.
Introducing part 3
Back in part 2, we showed you how to improve the foliage appearance via content changes.
Here in part 3, we show you how to apply the ImproveStaticWPO patch, and the results.
There is a separate guide for how to use the FSR 2 Unreal Engine plugin - don't miss it! This blog series relates specifically to enhancements available with FSR 2.2, and using the patches bundled with this release.
Note: Patches to Unreal Engine do require that developers build from source, as the patches cannot be applied to the binary editor distributed by Epic. However, this blog post series also shows you how to make changes to their project settings and content to achieve the same results where possible.
Applying the ImproveStaticWPO patch
For developers building from source, the ImproveStaticWPO patch can be applied for Unreal Engine 4.26, 4.27, and 5.0 by following the steps below.
This patch is not available for Unreal Engine 5.1 as Epic have substantially refactored how World PositionOffset is evaluated and it should therefore no longer be required.
Git
At a terminal supporting Git:
- Download the FSR 2 plugin and unzip.
- Clone the Unreal Engine Repository:
-
git clone <repo-url>
where<repo-url>
should be replaced with the URL to the source repository.
-
- Navigate to the root of the Unreal Engine:
-
cd UnrealEngine
-
- Checkout the version of Unreal Engine to be patched:
-
git checkout <version>
where<version>
should be replaced by the version number such as 4.26, 4.27 or 5.0.
-
- Install the appropriate FSR 2 plugin version to
Engine/Plugins/Runtime/AMD
. - Apply the patch with Git:
-
git am <path/to/patch>
replacing<path/to/patch>
with the path to theImproveStaticWPO.patch
file appropriate for the engine version.
-
- Build the engine and check that the patch functions correctly.
- Push the change upstream:
-
git push origin HEAD
-
Other SCMs
- Download the FSR 2 plugin and unzip.
- Clone the Unreal Engine from the SCM and setup the correct Unreal Engine version as needed.
- Install the appropriate FSR 2 plugin version to
Engine/Plugins/Runtime/AMD
. - Navigate to the root of the Unreal Engine:
-
cd UnrealEngine
-
- Patch the files using the ‘patch’ command-line tool:
-
patch -p1 < <path/to/patch>
replacing<path/to/patch>
with the path to theImproveStaticWPO.patch
file appropriate for the engine version.
-
- Build the engine and check that the patch functions correctly.
- Submit to the SCM.
Patch results
Applying the patch changes the behaviour of the engine to render velocity for objects that use WPO materials even when they are determined to be Static, provided r.BasePassOutputsVelocity
is disabled. As with the content changes, enabling this option can result in some static meshes not generating motion vectors. This now allows all WPO materials to emit motion vectors for FSR 2.
The patch does not change the Mobility of components, so the only change in behavior is the addition of rendering velocity which will add some overhead on the CPU and GPU. It should not otherwise change the behavior or appearance of the affected objects, unlike changing the Mobility setting of the content.
With the motion vectors available, the FSR 2 upscaling algorithm produces far better results with the grass close to the camera.
Below: 4K screenshots reduced to 1600px wide for comparison
Below: 1:1 pixel comparison of 4K screenshot.
Coming up next
Continue reading in part 4 to learn about making materials reactive, with the addition of an option in the UE FSR 2.1 plugin to make a specific shading model write to the reactive mask. This is useful in circumstances where a material animates which can cause the upscaler to produce suboptimal results as no motion vectors will exist for the moving pixels. This is especially noticeable when the animated material is obscured by a fine mesh or grill as this confuses the algorithm without motion vectors to indicate what is moving.
Alternatively, feel free to skip ahead to one of the other parts:
Part 1 – Improving foliage appearance: Introduction and using the base pass for velocity generation.
Part 2 – Improving foliage appearance: Improvements via content changes.
Part 3 – Improving foliage appearance: Applying the ImproveStaticWPO patch.
→ Part 4 – Making materials reactive: How to make a specific shading model write to the reactive mask.
Part 5 – Making materials reactive: Applying the LitReactiveShadingModel patch.
AMD FSR 2 UE plugin enhancements part 4: Making a specific shading model write to the reactive mask
See ways you can improve suboptimal FSR 2 results caused by animated materials obscured by a fine mesh or grill with no motion vectors.
Get the Unreal Engine FSR 2 plugins now!
The package linked below contains the latest version of all our currently available UE 4/5 plugins [~600MB]
- Includes the patches referred to in this blog series.
Find out more about FSR 2 and our Unreal Engine plugin
AMD FidelityFX™ Super Resolution 2 (FSR 2)
Learn even more about our new open-source temporal upscaling solution FSR 2, and get the source code and documentation!
How to use the AMD FidelityFX™ Super Resolution 2 (FSR 2) Unreal Engine plugin
Find out how to install and configure the AMD FidelityFX Super Resolution (FSR) 2 plugin for Unreal Engine 4.26/4.27 and UE5.
Learn more about FSR and Unreal Engine
How to use AMD FidelityFX™ Super Resolution (FSR) 1.0 Unreal Engine 4 Plugin
Find out how to install and configure the AMD FidelityFX Super Resolution (FSR) 1.0 plugin for Unreal Engine 4.
AMD FidelityFX™ Super Resolution 1 (FSR 1)
AMD FidelityFX Super Resolution (FSR) is our open-source, high-quality, high-performance upscaling solution.
Unreal Engine
Develop for Unreal Engine on AMD hardware with our plugin, performance and feature patches, including FidelityFX support.
FOOTNOTE:
The information contained herein is for informational purposes only, and is subject to change without notice. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement, merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other products described herein. No license, including implied or arising by estoppel, to any intellectual property rights is granted by this document. Terms and limitations applicable to the purchase or use of AMD’s products are as set forth in a signed agreement between the parties or in AMD’s Standard Terms and Conditions of Sale.
AMD, the AMD Arrow logo, FidelityFX, FidelityFX Super Resolution, FidelityFX Super Resolution 2.0 and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective companies.
Unreal® is a trademark or registered trademark of Epic Games, Inc. in the United States of America and elsewhere.
© 2022 Advanced Micro Devices, Inc. All rights reserved.