Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement AMD FidelityFX Super Resolution (FSR) in the Vulkan renderer #2809

Closed
mahdisml opened this issue Jun 2, 2021 · 10 comments · Fixed by godotengine/godot#51679
Closed

Comments

@mahdisml
Copy link

mahdisml commented Jun 2, 2021

Describe the project you are working on

3D Horror Game

Describe the problem or limitation you are having in your project

low FPS problem

Describe the feature / enhancement and how it helps to overcome the problem or limitation

AMD FidelityFX Super Resolution (FSR)
FidelityFX Super Resolution is a spatial upscaling technique, which generates a “super resolution” image from every input frame. In other words, it does not rely on history buffers or motion vectors. Neither does it require any per-game training.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

https://gpuopen.com/fsr-announce/

If this enhancement will not be used often, can it be worked around with a few lines of script?

idk

Is there a reason why this should be core and not an add-on in the asset library?

You could see FSR as an Rendering enhancement and I don't think changing the rendering as an add-on is such a good idea. Unreal Engine and Unity3D added DLSS in core ! :)

@Calinou Calinou changed the title AMD FidelityFX Super Resolution (FSR) Implement AMD FidelityFX Super Resolution (FSR) Jun 2, 2021
@Calinou Calinou changed the title Implement AMD FidelityFX Super Resolution (FSR) Implement AMD FidelityFX Super Resolution (FSR) in the Vulkan renderer Jun 2, 2021
@Calinou
Copy link
Member

Calinou commented Jun 2, 2021

See also #2779.

Some comments:

  • It's not the first time AMD is trying their hand at sharpening/upscaling. FidelityFX CAS is one prior example of that (proposal), and it includes an optional fast upscaling filter.

  • FSR will not be open sourced by AMD right away. It will be integrated into 10 AAA games or so in June, then it will be open sourced later on.

  • FSR works with Vulkan, Direct3D 12 and Direct3D 11. No OpenGL support has been mentioned, which means it can't be backported to the 3.x branch.

  • FSR does not require motion vectors, but it may require the image to be antialiased using a temporal method beforehand (or perhaps MSAA) to look good. In contrast, FXAA is not a temporal antialiasing method. Whether this indirect motion vector requirement is true is unknown – it's just guesswork right now 🙂

  • FSR is probably not a machine learning-based method, which means it differs a bit from something like Anime4K (which also works without motion vectors).

    • Like Anime4K, I think FSR will work best in games that use a stylized art style with little amounts of high-frequency detail. With its non-machine-learning-based nature, it's very hard to actually improve texture detail.
  • In Godot, there are plans to expose motion vectors in the future (along with temporal antialiasing/upscaling), but not for 4.0.

  • It would be interesting to see whether FSR is usable on mobile, but it may rely on features only available on desktop GPUs (on top of being too demanding to run on mobile GPUs).

@Calinou
Copy link
Member

Calinou commented Jun 22, 2021

Update: FidelityFX Super Resolution has been released in some AAA games, although its source code isn't available yet.

List of supported GPUs as of writing:

  • AMD Radeon 6000 Series
  • AMD Radeon 6000M Series
  • AMD Radeon 5000 Series
  • AMD Radeon 5000M Series
  • AMD Radeon VII Graphics
  • AMD Radeon RX Vega Series
  • AMD Radeon 600 Series
  • AMD Radeon RX 500 Series
  • AMD Radeon RX 480/470/460 Graphics
  • AMD Ryzen Desktop Processors with AMD Radeon Graphics
  • AMD Ryzen Mobile Processors with Radeon Graphics
  • NVIDIA GeForce RTX 30 Series
  • NVIDIA GeForce RTX 20 Series
  • NVIDIA GeForce 16 Series
  • NVIDIA GeForce 10 Series

Unfortunately, Intel IGPs and old GPUs such as NVIDIA Kepler and Maxwell aren't supported. It's also uncertain whether FSR will be usable on Android/iOS.

The GPUOpen announcement says:

The source code for FidelityFX Super Resolution 1.0 will be coming to GPUOpen in mid July!

@YuriSizov
Copy link
Contributor

YuriSizov commented Jun 22, 2021

Unfortunately, Intel IGPs

Well, GamersNexus claims that it should work on the new dedicated Intel GPU, and it definitely works on the new AMD Ryzen 5700G, the one with the iGPU, so maybe it will work those too. I think the official list given is only about the products that AMD has actually tested.

Also, support is enabled on the game side, so it should be possible to at least try it anyway.

Edit: There are reports from people testing it on Haswell now, and it works. It wouldn't be very beneficial for those iGPUs, however, as this technology proved to give the best results when used with 1440p and higher on a GPU bottlenecked system. At lower resolutions it would cause a lot of quality reduction due to how it works. So if your iGPU is barely reaching 20 fps at 720p, this will not help.

@mrjustaguy
Copy link

mrjustaguy commented Jun 25, 2021

Runs on Kepler GPUs, Tested - Nvidia Quadro K2000 (GTX 650 2GB Equivalent) in Dota 2, Does indeed Upscale, and improves performance by ~5-15% for a roughly same Picture result on 1080p, However Seems to scale better with higher resolutions (Quality-Performance scaling that is, meaning Upscaling to higher Resolutions will yield better performance for roughly the same Visual Quality as non upscaled rendering)

Haven't Tested Nvidia's Fermi GPU, but as that is D11 only, No point in doing so for Godot's sake, as it seems as only D11 and Vulkan are capable of using FSR and Godot doesn't have D11, but GL instead which doesn't seem supported, and Fermi cards don't support Vulkan/D12.

@Zireael07
Copy link

AMD Fidelity FX was just open sourced: https://github.com/GPUOpen-Effects/FidelityFX-FSR

@Calinou
Copy link
Member

Calinou commented Jul 15, 2021

AMD Fidelity FX was just open sourced: GPUOpen-Effects/FidelityFX-FSR

Note that before FSR can be added to Godot, we need to implement decoupling of the 3D rendering resolution from the viewport size. This way, 2D elements can keep their native resolution without requiring the use of a separate viewport (which requires more housekeeping and is likely slower overall). This will also pave the way for dynamic resolution scaling, which can work together with FSR.

Also, the CAS proposal is still relevant as AMD recommends not using RCAS (FSR's sharpening shader) alone. However, it may be considered less important nowadays.

@LiveTrower
Copy link

LiveTrower commented Jul 15, 2021

I don't know why but it works on my GTX 960.
Sin título

@Calinou
Copy link
Member

Calinou commented Jul 15, 2021

I don't know why but it works on my GTX 960.

According to the developer presentation, FSR works on Maxwell GPUs too. However, it will use a slower FP32 (full precision) code path instead of the faster FP16 (half precision) code path. Both look pretty much identical.

@LiveTrower
Copy link

I don't know why but it works on my GTX 960.

According to the developer presentation, FSR works on Maxwell GPUs too. However, it will use a slower FP32 (full precision) code path instead of the faster FP16 (half precision) code path. Both look pretty much identical.

I'm happy to read that, something is better than nothing.

@mrjustaguy
Copy link

FSR Does run on Kepler GPUs too, but it's performance gains are not very large as it takes a bit of computation, but do note that FSR can have a negative performance effect if drawing pixels is just cheaper than upscaling (which isn't common, outside of very simple graphics levels)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants