Add FSR3 Upscaler support#111631
Conversation
|
At Native Quality, and FSR 2.3 is an upgrade over 2.2 on a few bright elements in motion in my Game (that with 2.2 tend to exhibit an unusual darkening until the motion stops), However 3.1 is... Bad... Like this artifact from Flashing Lights happens a LOT in 3.1 but not in 2.3/2.2 though Mind you 2.3/2.2 tend to have leftover fireflies when something was very sharply bright/dark but this is also present in 3.1 I have been Unable to test if FSR 4 Works, as been unable to compile DX12 to run on my Brother's 16 gig RX 9060 XT, which for Native rendering is the only potential saving grace for RDNA4 (and possibly eventually RDNA3 and below, and even other vendors, depending on what kind of official support AMD has with their int8 version) users Upscaling (at 0.5 render scale) differences are mainly in Transparency Handling which is better and less pixelated and also seems to preserve antialiasing a bit better in some scenarios, but the issue created in 3.1 at Native just absolutely murders any of the Quality Gains. However I haven't been able to see a difference in Performance Between Native FSR 2.3 and 3.1, which I expected FSR 3.1 to take 50% longer according to AMD's own Performance Estimates (I'm getting 2.2ms on both at native res on an RX 6600) https://gpuopen.com/fidelityfx-super-resolution-3/ All This leads me to believe something is Wrong with this FSR 3.1 Implementation. (though the Light issue with 3.1 I have observed to a lesser extent in Other FSR 3.1 games such as Everspace 2 and Star Wars Outlaws neither of which have FSR 2 for comparison, and may be an issue with it and not the implementation of it, that my Game is suffering particularly heavily from) |
|
@mrjustaguy As for the lighting artifact, I could also see some extent on my side. If possible, could you provide a test scene in which the problem you describes is clearly observable, so that I could investigate the reason that could have caused it? |
|
Sure, Give me a little to make all the MRPs for all of the comparisons I'm making in an edit on this in a bit. Do keep in mind however the Light issue described above is an FSR 3.1 issue given the other games also suffer from, just to a lesser degree and it may be just that content differences are making it act up far more in my testing. One thing that may be an implementation issue is the Transparency-Opaque transition AA falling apart.. Also while writing this I started experiencing heavy Godot instability with FSR 3.1 enabled Edit: OK, fun little observation. In one of the Opaque AA stress tests where FSR 3.1 performs really well compared to FSR 2.3 I've managed to break the AA completely (turns totally jittery and unstable) when adding a Material to one of the Planes (even though it's not in the background of the AA that goes bonkers) and shortly after that it crashes |
This is highly possible. FSR relies on something called the Transparency & Composition mask. In the previous FSR2 implementation, this mask isn't provided, maybe because of rendering architectural reasons. So I still kept it unprovided within FSR3. It's possible that FSR3 is more reliant on this mask to produce good-looking effects.
Do you mean Godot crashing? Is there a log or something I could check for? |
|
That's probably the reason, I have never seen this issue with FSR 3.1 games Really the only two issues are that and the Lighting Lag/Semi Clear up issue (with both really being massive pain points in my Space Game, as Transparent Background and Lights Flashing in and out a ton hahaha) Other testing that I have done since however hasn't shown any more problems and generally it is an improvement if you ignore the Transparencies (specifically due to the Opaque-Alpha Transition) and rapid Light Changes.. anyhow back to MRP-ing I'll look for Logs |
I have met an occasion crash case denoted as: If the one you met is the same, then I could confirm that it's not purely occasional but somehow reproducible and will seek to investigate it. |
|
I have found a way to Reproduce it consistently, by adding a MeshInstance, setting mesh to Plane, and then duplicating the instance |
|
This MRP Showcases the Light issue quite well, and the Alpha-Opaque Instability EDIT: Here's the proper Test Scene, with the Alpha Opaque Instability, Forgot to save that last addition before shipping it into the zip... 🙄 |
Thanks a lot! I would investigate if it's a implementation bug or just a artifact caused by lack of composition mask input. If it's the latter, we would have little way to improve it. |
|
Some more FSR 3.1 testing VS FSR 2.3 and observations Low Quality Soft Shadows don't leave Significantly less fireflies in 3.1, and now Soft Shadows on Low give results beating Soft Shadows Ultra at equivalent blur (when it Comes to Fireflies, the Soft Shadows do look a little grainy, but stable) Another thing that I have to note is that Once you take out Alpha out of the equation, the AA is far more stable both when static and in motion, and I have failed to produce FSR 2's AA collapse that occurs in motion in some instances (not to be confused by #104622) Also some instances of Ghosting that I have been consistently able to reproduce with FSR 2 have been eliminated (around Caused by Smooth Metalic Objects moving close to an Explosion that's lighting it up and the background Object) I have been unable to find any further issues, so For most instances I'd go with 3.1 over 2.3, and I'd only Pick 2.3 in cases of Heavy Alpha transparency usage covering large areas of the screen constantly and Fast Moving/changing Lights, as it stands right now. |
Nice to hear that. So FSR3 does have improvements over FSR2. The first thing I'm going to do is to investigate those crashes which are AFAIK caused by resource use after free. And once that is fixed, this PR is mergable. Then I will try if I could generate a transparancy & composition mask without overhauling the rendering pipeline, to relieve the alpha problem you encountered. And if it's possible, I'll also add that mask for FSR2. |
d0f88fe to
3d922aa
Compare
|
@mrjustaguy I discovered and fixed the bug that caused the instability, which is actually an upstream (#111512 ) problem. Now I fixed it upstream and rebased this PR. Could you please test again whether the stability improves and that Godot no longer crashes? |
4477e88 to
56b1bd7
Compare
|
I will be able to confirm it in a little over half an hour when it builds on my weak lil quad core |
|
I get this error while trying to build Ubuntu 25.4 |
|
The instability seems to have been resolved for me |
56b1bd7 to
7e8b959
Compare
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
59af098 to
a2f49a1
Compare
|
I noticed that there are some updates in the last rendering meeting, mentioning converting upscaler to something like a compositor effect #80925. That would be a better architecture, as long as it exposes necessary attachments. When the refactor is done, I would be glad to revive this PR in the new integration style. |
|
any new info about this? |
As far as I know this PR won't be adopted in the current form according to the rendering meeting. |
|
it should also be noted that Nvidia's going about their own approach to this problem via Streamline integration into Godot, which can be used to integrate FSR and XeSS and is used to integrate DLSS |
I've rebased my PR so it's usable again. Would be good to try and port FSR3 to being a GDExtension using that implementation, see what holes we find |



Overview
This PR only introduces FSR3 UPSCALER, which means FRAME GENERATION is irrelevant. In FSR 3.1, upscaler and frame gen is fully decoupled, so we can introduce either of them independently of the other.
This PR adds support for Fidelity Super Resolution (FSR) 3.1.4 on top of the common Fidelity FX interface introduced in #111512 .
The PR also contains improvements to and update to FSR1/2 and fundamental changes to the FSR interface, see description in #111512.
When the upscale multiplier is large (rendered/upscaled<0.7), you may expect glitches on faraway objects. Such glitches are also seem on the existing FSR2. This is a algorithm limitation of the FSR temporal upscaling, not likely a artifact caused by the implementation of this PR.
Improvement to FSR2
This PR adds a new option called "FSR auto generate reactive mask". If checked, FSR 2/3 will also run an additional reactive mask generation mask, which considerably reduces the flickering when dealing with transparent objects. The pass takes an opaque-only color attachment as input, so the color attachment is copied and saved between opaque render and transparent render. The additional pass could also be enabled for and benefit the existing FSR2 effect. The stabilization is quite conspicuous, for both FSR 2 and 3 (see comparison in comment below).
Tests
Tested on Windows Vulkan & DX12, other platforms untested.
Benchmarks
Todos