Thursday, July 15th 2021

AMD FidelityFX FSR Source Code Released & Updates Posted, Uses Lanczos under the Hood

AMD today in a blog post announced several updates to the FidelityFX Super Resolution (FSR) technology, its performance enhancement rivaling NVIDIA DLSS, which lets gamers dial up performance with minimal loss to image quality. To begin with, the company released the source code of the technology to the public under its GPUOpen initiative, under the MIT license. This makes it tremendously easy (and affordable) for game developers to implement the tech. Inspecting the source, we find that FSR relies heavily on a multi-pass Lanczos algorithm for image upscaling. Next up, we learn that close to two dozen games are already in the process of receiving FSR support. Lastly, it's announced that Unity and Unreal Engine support FSR.

AMD broadly detailed how FSR works in its June 2021 announcement of the technology. FSR sits within the render pipeline of a game, where an almost ready lower-resolution frame that's been rendered, tone-mapped, and anti-aliased, is processed by FSR in a two-pass process implemented as a shader, before the high-resolution output is passed on to post-processing effects that introduce noise (such as film-grain). HUD and other in-game text (such as subtitles), are natively rendered at the target (higher) resolution and applied post render. The FSR component makes two passes—upscaling, and sharpening. We learn from the source code that the upscaler is based on the Lanczos algorithm, which was invented in 1979. Media PC enthusiasts will know Lanczos from MadVR, which has offered various movie upscaling algorithms in the past. AMD's implementation of Lanczos-2 is different than the original—it skips the expensive sin(), rcp() and sqrt() instructions and implements them in a faster way. AMD also added additional logic to avoid the ringing effects that are often observed on images processed with Lanczos.
With the source code now fully available, nothing stops developers from adding FSR into their games. Unlike NVIDIA's DLSS solution, FSR requires almost no engine tweaks, you just add the shader pass into your rendering pipeline. In a separate PDF document AMD went into more detail on how to integrate FSR, what inputs are required, and how to present the new rendering options to the end-user.

We took a closer look at the source code AMD is providing, and it's really the full source. There are no external dependencies or DLLs. You are free to modify and adapt as you see fit. This makes FSR an interesting tech for modders, who should be able to more easily integrate the tech into existing games, through hooks. Also there's nothing that would prevent this from running Linux. AMD's sample code includes Windows samples only at this time, but integrating FSR with other operating systems, even cell phones is trivial at this point. AMD has also released a demo for FSR, which lets you dig into all the settings options and compare them in a way that's better suited to investigation, than a hectic game. We've uploaded it to our downloads section.

AMD also announced that even more games will receive FSR support, with announcements lined up for tomorrow. Among these titles are Edge of Eternity, Resident Evil 8: Village, and Hired Gun. The company also announced implementation of FSR with two leading game engines, Unreal Engine 4 and Unity.

AMD is working with game studios with implement FSR with Asterigos, Baldur's Gate 3, Far Cry 6, Farming Simulator 22, Forspoken, Myst, Swordsman Remake, and Vampire the Masquerade: Bloodhunt.

If you haven't yet, check our our in-depth review of AMD's FSR upscaling technology (posted in July).
Sources: FSR Source Code, AMD FSR Developer Page, FSR 1.0 Docs
Add your own comment

92 Comments on AMD FidelityFX FSR Source Code Released & Updates Posted, Uses Lanczos under the Hood

#1
john_
And this is how you take the market. Sure DLSS is better, sure Nvidia is much stronger, but who can say no to something free that is offering a good enough alternative and it is also easy to implement?
Let's hope game developers will do what someone would consider obvious. Use it.
Posted on Reply
#2
Chane
Interesting. I wonder if people will patch in SuperXBR or NNEDI3 in place of Lanczos and port to Reshade. HUDs would be affected, but whatever. Cool stuff.
Posted on Reply
#4
W1zzard
ChaneI wonder if people will patch in SuperXBR or NNEDI3 in place of Lanczos and port to Reshade
Why would they do that just now, when it has been possible for decades?
ChaneHUDs would be affected, but whatever.
In (probably) most games you just have to hook into the render pipeline at the right point. Of course this is complicated because you don't have the source code, but dumping the contents of rendertargets is not that difficult
Posted on Reply
#5
DeathtoGnomes
john_And this is how you take the market. Sure DLSS is better, sure Nvidia is much stronger, but who can say no to something free that is offering a good enough alternative and it is also easy to implement?
Let's hope game developers will do what someone would consider obvious. Use it.
The same thing was said when Vulkan came out
Posted on Reply
#7
dcf-joe
You can download a sample program here that AMD made where you can play around with FSR in real-time: gpuopen.com/fidelityfx-superresolution/

Just tried it myself on my work laptop, it's pretty cool. You can choose between either a DX12 or a Vulkan version and you can change the FSR levels using the 2-5 number keys.
Posted on Reply
#8
Upgrayedd
DeathtoGnomesThe same thing was said when Vulkan came out
Speaking of Vulkan. Does RDR2 using Vulkan support DLSS or is it DX12 only?
Posted on Reply
#9
DeathtoGnomes
UpgrayeddSpeaking of Vulkan. Does RDR2 using Vulkan support DLSS or is it DX12 only?
Yes.
Posted on Reply
#10
Chane
W1zzardWhy would they do that just now, when it has been possible for decades?


In (probably) most games you just have to hook into the render pipeline at the right point. Of course this is complicated because you don't have the source code, but dumping the contents of rendertargets is not that difficult
Haha, who knows. I'm just over here forever day dreaming. My shader code experience is just copy pasting things together and maybe getting something functional.
Posted on Reply
#11
watzupken
john_And this is how you take the market. Sure DLSS is better, sure Nvidia is much stronger, but who can say no to something free that is offering a good enough alternative and it is also easy to implement?
Let's hope game developers will do what someone would consider obvious. Use it.
This is true. And I think there is no reason why developers will not implement it going forward, especially when most if not all PC games will also be available on consoles. Console gaming market need FSR or some sort of upscaling technology more than the PC gaming market in my opinion since there is no way to upgrade GPU.
Posted on Reply
#12
wolf
Performance Enthusiast
john_Sure DLSS is better, sure Nvidia is much stronger, but who can say no to something free that is offering a good enough alternative and it is also easy to implement?
This really is where it can shine, it doesn't produce the same performance/IQ result, but it doesn't have to, though objectively inferior its going to basically drop right into a tonne of games and be acceptable enough for a lot of people to use, what's not to like. Good enough really is good enough in this case because of the ease, speed of implementation and accessibility to gamers.

Someone said it really well, It doesn't have as many upsides as DLSS, but it has fewer downsides. I look forward to using both! Provided the Ultra Quality preset at native 3440x1440 is indeed close enough, my personal tastes of performance preference make it a very desirable and easy-to-tick setting.
Posted on Reply
#13
Nkd
DeathtoGnomesThe same thing was said when Vulkan came out
you wanted to make a point so we get it. But this is comparing apples to oranges. This is upscaling and takes a day to implement according developer and with little man power. So please take the comparison and throw it out the window. Literally couldn't be more wrong about the comparison of the two.
Posted on Reply
#14
Crackong
DeathtoGnomesThe same thing was said when Vulkan came out
No it is Freesync vs G-Sync again.
Posted on Reply
#15
turbogear
Sounds like easy to implement for games studios and on top of that it is free. :D
Let's hope many games will implement it especially it is tech that is not limited to AMD hardware and all GPU brands including Intel when they launches their new descrete GPU can benefit from this. :rolleyes:
Posted on Reply
#16
GamerGuy
I just hope Metro Exodus dev hasn't been locked into DLSS exclusive only, I'd love to see FSR + RT on this game.....though I have my doubts.
Posted on Reply
#17
wolf
Performance Enthusiast
GamerGuyI just hope Metro Exodus dev hasn't been locked into DLSS exclusive only, I'd love to see FSR + RT on this game.....though I have my doubts.
This already has a fairly robust TAAU if I'm not mistaken, iirc 4a are done with exodus now.
Posted on Reply
#18
Mussels
Moderprator
I expect this will fly into mobile games, fast

It's open source, but i assume they need to credit AMD if they use it
Posted on Reply
#19
W1zzard
MusselsI expect this will fly into mobile games, fast

It's open source, but i assume they need to credit AMD if they use it
Just need to include the MIT copyright notice in the shipping software. Other than that, it's a free license, and allows you to use the software for any purpose you might like, including commercial and for-profit use.
Posted on Reply
#20
DeathtoGnomes
Nkdyou wanted to make a point so we get it. But this is comparing apples to oranges. This is upscaling and takes a day to implement according developer and with little man power. So please take the comparison and throw it out the window. Literally couldn't be more wrong about the comparison of the two.
I didnt make the comparison, I answer a question with a video, whatever was in the video that made it is not my opinion.
Posted on Reply
#21
Mussels
Moderprator
W1zzardJust need to include the MIT copyright notice in the shipping software. Other than that, it's a free license, and allows you to use the software for any purpose you might like, including commercial and for-profit use.
just curious to see how fast and how rapidly it appears in things

i can absolutely see mobile gaming consuming this like my dog with bacon, and just had the thought of how we'd know if it was used or not
Posted on Reply
#22
InVasMani
I'd like to see Microsoft utilize it for desktop windows manager rendering to upscale the desktop more cleanly at higher resolutions. Not sure if there is a means for them to hook into the render pipeline and insert some FSR scaling or not, but if so that would be a clutch work around to a problematic thorn in their side for a long time now. I need to experiment further with my rather complex CAS setup with Reshade and see if I can improve it more. There is actually potential maybe to even incorporate some of this source code with it not sure which would be pretty kicking perhaps Reshade will add AMD's fast approximation lanczos code as a shader.

There are things with FSR I can see AMD improving on blend modes for example like LCh Lightness, Luminance, luma darken, luma lighten, and color erase could all work nicely alongside CAS or Lanczos upscale. Having ways to adjust that into those post process passes would be great. As a example nearest neighbor which is similar to lanczos along with color erase at a opacity of 40/40.2 gives a very nice scene pop sharpening of sorts you could reduce that to taste thoughto 20/20.2 or 10/10.2 to lessen the strength of that however.

Incorporating a bit of that into their FSR would be a solid improvement and wouldn't heavily impact the GPU performance. I think it would work similarly with CAS though as well and probably less resource intensive doing it at that stage of the pipeline. There are pro's and con's to injecting these different elements at more of the tonemapp point in the injection chain or after upscale however. The reason I incorporate DPX with CAS using reshade is you get a bit of luminance value control with DPX that CAS lacks and it helps quite a bit in practice used well.
Posted on Reply
#23
ZoneDymo
now if someone could just add this to Red Dead, that would be swell
Posted on Reply
#24
mouacyk
That old addage of quantity vs quality. Then in correlation, free vs premium. It's not necessarily pick one.
Posted on Reply
#25
eidairaman1
The Exiled Airman
john_And this is how you take the market. Sure DLSS is better, sure Nvidia is much stronger, but who can say no to something free that is offering a good enough alternative and it is also easy to implement?
Let's hope game developers will do what someone would consider obvious. Use it.
I wouldn't say dlss is better, however FSR is more efficient due to no image training required.

AMD is for sure adapting and overcoming challenges.
ZoneDymonow if someone could just add this to Red Dead, that would be swell
I think RDR 2 supports it, are you saying RDR1?
dcf-joeYou can download a sample program here that AMD made where you can play around with FSR in real-time: gpuopen.com/fidelityfx-superresolution/

Just tried it myself on my work laptop, it's pretty cool. You can choose between either a DX12 or a Vulkan version and you can change the FSR levels using the 2-5 number keys.
See the message above
UpgrayeddSpeaking of Vulkan. Does RDR2 using Vulkan support DLSS or is it DX12 only?
Posted on Reply
Add your own comment