Skip to content

FSR 1 render pipeline #16994

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

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

FSR 1 render pipeline #16994

wants to merge 6 commits into from

Conversation

matanui159
Copy link
Contributor

Started working on this in my own time for fun and had some time to kill waiting for reviews so decided to finish it off and clean it up. Implements AMD's FSR upscaling. Currently only version 1 since it's provided as a set of shaders and how to use them which makes it a lot easier to port than later versions which is a full C library.

Only supports WebGPU rn since it uses texture gather operations which GLSL doesn't support. Technically support could be added by changing the code to do 4 separate texture fetches. This does also mean I had to port the FSR code to WGSL which was surprisingly easy. I left the code intentionally messy so it matches the original as closely as possible.

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 7, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Aug 8, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@deltakosh deltakosh requested review from Popov72 and sebavan August 8, 2025 09:30
Copy link
Member

@sebavan sebavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add the glsl version even requiring several fetches ? as I guess in the end we ll end up with 4 texelFecth one per texel vs the 3 textureGather one per channel ?

And due to the texels locality the cache might be a huge time saver here ?

@sebavan
Copy link
Member

sebavan commented Aug 8, 2025

Also a visual test would be great here if possible as well as a PG to test it out.

@ryantrem
Copy link
Member

ryantrem commented Aug 8, 2025

Do you have a PG that demonstrates this?

@matanui159
Copy link
Contributor Author

matanui159 commented Aug 11, 2025

Could we add the glsl version even requiring several fetches ? as I guess in the end we ll end up with 4 texelFecth one per texel vs the 3 textureGather one per channel ?

And due to the texels locality the cache might be a huge time saver here ?

Problem is rewriting the logic and hoping not to break anything. With the conversion to WGSL I tried to keep the code/logic as close as possible (which is why it's so messy. the FidelityFX team really don't like spaces apparently lol)

Do you have a PG that demonstrates this?

http://localhost:1338/#PIZ1GK#2257

@sebavan sebavan marked this pull request as draft August 18, 2025 14:44
@sebavan
Copy link
Member

sebavan commented Aug 18, 2025

marking as draft for now to tidy up in progress reviews, lets reopen when ready

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

Successfully merging this pull request may close these issues.

4 participants