
Unreal Engine
Develop for Unreal Engine on AMD hardware with our plugin, performance and feature patches, including FidelityFX support.
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 the final part – 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.
Back in part 4, we showed how to improve the visual quality of animated materials by making shading models write to the reactive mask.
Here in part 5, we show you how to apply the LitReactiveShadingModel patch, and the results.
Important!
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.
For projects where it is not possible to repurpose a shading model in the fashion outlined in part 4, there is now an optional engine patch file, LitReactiveShadingModel.patch
, provided with the FSR 2 plugin that adds a new Lit Reactive shading model. This new shading model operates identically to Default Lit except that it also allows developers to write a value to the CustomData0.x
channel which will then be consumed by the CreateReactiveMask pass in the FSR 2 plugin.
For developers building from source the patches can be applied using the following steps.
At a terminal supporting Git:
git clone
where should be replaced with the URL to the source repository.cd UnrealEngine
git checkout
where should be replaced by the version number such as 4.26, 4.27 or 5.0.Engine/Plugins/Runtime/AMD
.git am
replacing with the path to the LitReactiveShadingModel.patch
file appropriate for the engine version.git push origin HEAD
Other SCMs
Engine/Plugins/Runtime/AMD
.cd UnrealEngine
patch -p1 < <path/to/patch>
replacing <path/to/patch>
with the path to the LitReactiveShadingModel.patch
file appropriate for the engine version.Once applied and the engine is rebuilt it is then possible to select the Lit Reactive shading model in the material editor:
Once selected it is possible to pass a value to the Custom Data 0
output:
You then must select the Lit Reactive as the Reactive Shading Model in the FSR 2 settings and disable the Force value for Reactive Shading Model by setting it to 0.0
.
Select Lit Reactive as the Reactive Shading Model in FSR 2 settings
Disabling force value for Reactive Shading Model by setting it to 0
In this configuration only the specific assets using the new shading model will write into the reactive mask and write the value specified in the material graph, while still providing the improved rendering of the obscured animated material.
Below: 1:1 pixel comparison of the 4K screenshots above.
We hope you have found this blog post series helpful with improving the visual quality of FSR 2 in your Unreal Engine game.
Before you go, feel free to take a look back at any parts you’d like to read again:
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.
The package linked below contains the latest version of all our currently available UE 4/5 plugins [~600MB]
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.