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 4 – 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 4
Back in part 3, we showed you how to apply the ImproveStaticWPO patch, and the results.
Here in part 4, we show you how to improve the visual quality of animated materials by making shading models write to the reactive mask.
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.
Making materials reactive
Following on from the foliage improvements discussed in the first part of this series, another improvement introduced with the FSR 2.1 plugin is the addition of an option 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.
Example
Below is a modified version using UE 4.27 of the ShooterGame sample. A grid has been placed in front of some animated billboards which have been modified to scroll vertically rather than horizontally, use the Default Lit Shading Model, and render opaque. These modifications to the sample make it much easier to see the ghosting that can occur with FSR 2 compared to the default upscaler.Â
Below: 1:1 pixel comparison of 4K screenshot.
Solution
In FSR 2.1 there are now options to alleviate this issue by having animated materials write into the reactivity mask. This reduces the ghosting.
The simplest option is to set the Material shading model to one that still renders acceptably but is not otherwise used in the scene. In the example below there is no other use of the Subsurface Profile model, so this option can be used in the material.
For Unreal Engine 5.1
In this version of Unreal Engine the UI has changed. Select the SetMaterialAttributes and add a new element.
Then select ClearCoat.
Then add a value to the new reactivity output will be added.
Once the unused shading model has been selected for the material. Go to Project Settings > Plugins > FidelityFX Super Resolution 2.1Â and select the chosen shading model in the Reactive Shading Model drop-down menu so that it will write into the reactive mask and set the Force value for Reactive Shading Model.
With these settings enabled, the billboard material is identified in the FSR 2 pass that creates the reactive mask. The value of Force value for Reactive Shading Model is written into the reactive mask.
The comparison screenshots below using UE 4.27 show the FSR 2.1 default on the left, and “Reactive Shading Model” plus “Force value for Reactive Shading Model” enabled on the right.
Below: 1:1 pixel comparison of 4K screenshot above.
Comparing the result, the billboard no longer ghosts along the axis of motion and remains sharp.
In the screenshot comparisons below using UE 4.27, on the left, “Force value for Reactive Shading Model” is set to 0, and on the right it is set to 1.
Below: 1:1 pixel comparison of the 4K screenshots above.
Coming up next
For projects where it is not possible to repurpose a shading model in this fashion 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 you to write a value to the CustomData0.x
channel which will then be consumed by the CreateReactiveMask pass in the FSR 2 plugin.
We explain how to apply this patch in the final part 5 of this blog series.
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 5: Making materials reactive: Applying the LitReactiveShadingModel patch
This final part demonstrates how to apply the LitReativeShadingModel patch which adds a new Lit Reactive shading model.
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.