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

Support for AMD FSR 2.0 #5232

Open
MarioPL98 opened this issue Jul 6, 2022 · 11 comments
Open

Support for AMD FSR 2.0 #5232

MarioPL98 opened this issue Jul 6, 2022 · 11 comments
Assignees
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible C-Performance A change motivated by improving speed, memory usage or compile times S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@MarioPL98
Copy link

What problem does this solve or what need does it fill?

Great way to increase FPS, especially in 4k res or above. Open source and supports all gpus.

What solution would you like?

Implementing FSR 2.0 in a way that is simple to use and configure.

What alternative(s) have you considered?

Simple upscaling, however it is much worse in terms of quality.

Additional context

I suspect everyone is familiar with what FSR 2.0 is and how good it is.

@MarioPL98 MarioPL98 added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Jul 6, 2022
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Jul 6, 2022
@alice-i-cecile
Copy link
Member

I suspect everyone is familiar with what FSR 2.0 is and how good it is.

I'm not! Do you have a good link to read?

@alice-i-cecile alice-i-cecile added the C-Performance A change motivated by improving speed, memory usage or compile times label Jul 6, 2022
@nicopap
Copy link
Contributor

nicopap commented Jul 6, 2022

I don't think everyone is aware of what FSR is. FSR is an upscalling technology developed by AMD. It's very lightweight yet it results in really good quality image.

There are two versions. From what I hear FSR1 is very easy to implement, but FSR2 requires some more involvement I think. It might require motion vectors.

Here is some discussion on it:

@bjorn3
Copy link
Contributor

bjorn3 commented Jul 6, 2022

Looks like it indeed requires motion vectors. The source repo seems to be https://github.com/GPUOpen-Effects/FidelityFX-FSR2 which is under the MIT license.

@james7132
Copy link
Member

The shading language requirements are potentially possible to use with wgpu/naga. Not sure how much deeper the integration needs to go, or if we need to have speciifc native hardware access to support this.

@james7132 james7132 added the S-Needs-Investigation This issue requires detective work to figure out what's going wrong label Jul 6, 2022
@superdump
Copy link
Contributor

FSR 2.0 is apparently similar to what they helped Unreal to do for their temporal super resolution TAA/upscaling. It would be good as part of an effort to get some form of TAA working. Even if it would be fun to get a TAA implementation that we would make ourselves to work, using FSR 2.0 working would likely be more effective and efficient.

@Andrewp2
Copy link

Andrewp2 commented Jul 6, 2022

Shader Model 6 (cs__6_0) has some wave-related functions, which was a sticking point when I was investigating building a LBVH on compute shaders in wgpu (LBVH requires a radix sort, which requires a prefix sum, which uses a decoupled lookback algorithm which AFAIK wgpu currently can't support: https://raphlinus.github.io/gpu/2021/11/17/prefix-sum-portable.html (although the prefix sum doesn't have to use decoupled lookback, it's just faster)). There could be a similar issue here.

After a brief lookover of FSR 2.0, I don't immediately see anything like that. FSR 2.0 is super cool and I would love to get something like that in-engine.

@FraserLee
Copy link
Contributor

I'm also super intrigued by FSR2. Quality wise- it seems to be in the same rough order as DLSS, while actually open-source and available to people like us.

@nicopap From what I hear FSR1 is very easy to implement

Would it be at all worth someone (possibly me) trying to implement this in bevy, just to see how it integrates into the pipeline? Even if we don't have all the requirements (motion vectors, etc) yet, it could still be useful in the interim.

@nicopap
Copy link
Contributor

nicopap commented Aug 2, 2022

@FraserLee No idea how difficult it is in practice. I meant by "easy to implement" that everything FRS1 requires is already available in bevy. A first step would be evaluating https://github.com/GPUOpen-Effects/FidelityFX-FSR and the godot implementation, and see if it's in the ballpark of what you can do.

I personally wouldn't feel confident implementing it.

@FraserLee
Copy link
Contributor

FraserLee commented Aug 2, 2022 via email

@JMS55
Copy link
Contributor

JMS55 commented Feb 17, 2023

I have a semi-working crate that hooks into wgpu's vulkan backend to run FSR 2.1 https://github.com/JMS55/fsr2_wgpu, along with a branch of bevy setup to use it https://github.com/JMS55/bevy/tree/fsr2.

I'm currently trying to debug validation errors and fix them. Once that's done, I'll update to FSR 2.2, which was just released today, and then fill in the additional features like reactivity masks.

@JMS55 JMS55 added this to the 0.11 milestone Feb 17, 2023
@JMS55 JMS55 removed this from the 0.11 milestone Apr 17, 2023
@JMS55 JMS55 self-assigned this Jul 17, 2023
@JMS55 JMS55 added this to the 0.12 milestone Jul 17, 2023
@JMS55
Copy link
Contributor

JMS55 commented Jul 17, 2023

DLSS wasn't working for some reason. I couldn't get FSR working either last time I tried, but I have some new ideas. I'm going to give this another go soon.

@JMS55 JMS55 removed this from the 0.12 milestone Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible C-Performance A change motivated by improving speed, memory usage or compile times S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants