FSR 2.1 UE plugin enhancements part 4: Making a specific shading model write to the reactive mask

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. 

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.

AMD FSR 2

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.

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. 

TAAU FSR 2.0.1

Below: 1:1 pixel comparison of 4K screenshot.

TAAU FSR 2.0.1

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.

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.

UE4.27 FSR 2.1 Default UE4.27 FSR 2.1 'Reactive Shading Model' and 'Force value for Shading Model' enabled

Below: 1:1 pixel comparison of 4K screenshot above.

UE4.27 FSR 2.1 Default UE4.27 FSR 2.1 'Reactive Shading Model' and 'Force value for Shading Model' enabled

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.

UE4.27 FSR 2.1 'Reactive Shading Model' and 'Force value for ShadinForce value for Reactive Shading Model = 0.0g Model' enabled Force value for Reactive Shading Model = 1.0

Below: 1:1 pixel comparison of the 4K screenshots above.

UE4.27 FSR 2.1 'Reactive Shading Model' and 'Force value for ShadinForce value for Reactive Shading Model = 0.0g Model' enabled Force value for Reactive Shading Model = 1.0

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. 

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] and also includes the patches referred to in this blog series.

Find out more about FSR 2 and our Unreal Engine plugin

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.

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.

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.