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

#76
InVasMani
CammThis is true, the quality upscale in DLSS is excellent. Its just a shame that it magnifies deficiencies that are inherent to temporal solutions. I may have been being facetious, but I do believe DLSS 1.0 would have been successful if Nvidia took AMD's approach with FSR.
If you look at the recent RDR2 screenshots on TPU comparing DLSS on/off even in the thumbnail you can see how DLSS is killing the visibility of the footprints significantly on top of the being much softer and color just crushed I mean look at tree's and color of the leaves look at the characters pants and shadows on them and just the shadows in general between native and DLSS even in the thumbnail image it's readily apparent.
Posted on Reply
#77
Camm
InVasManiIf you look at the recent RDR2 screenshots on TPU comparing DLSS on/off even in the thumbnail you can see how DLSS is killing the visibility of the footprints significantly on top of the being much softer and color just crushed I mean look at tree's and color of the leaves look at the characters pants and shadows on them and just the shadows in general between native and DLSS even in the thumbnail image it's readily apparent.
Agreed, its pretty gross. I do believe this is an outlier though rather than representative of the whole.
Posted on Reply
#78
Unregistered
wolfDid I imply that? I mean if you take a game that has both DLSS and FSR, and show side by sides of both to a bunch of people, their preferences on which looks better will vary from person to person. As for the rest... believe what you want to believe I guess, your prerogative. Me? I tick the box and enjoy the output.
This is the debate I've been trying to diffuse on another popular tech' website; much of it comes down to personal taste. I've given up posting there now as you cannot have a debate in the face of such aggressive fanaticism!

In one comparison, the forum member was demonstrating Control, with DLSS in the left image, and a CAS sharpened image on the right side. Of course, one camp of responders is so adamant that the DLSS image is better, while as I flick between the two, the DLSS image suddenly looks as though I can no longer focus - my vision has gone kapput! It's a bizarre experience, making the CAS image appear much more natural to me - on the whole.
Posted on Edit | Reply
#79
nguyen
beedooThis is the debate I've been trying to diffuse on another popular tech' website; much of it comes down to personal taste. I've given up posting there now as you cannot have a debate in the face of such aggressive fanaticism!

In one comparison, the forum member was demonstrating Control, with DLSS in the left image, and a CAS sharpened image on the right side. Of course, one camp of responders is so adamant that the DLSS image is better, while as I flick between the two, the DLSS image suddenly looks as though I can no longer focus - my vision has gone kapput! It's a bizarre experience, making the CAS image appear much more natural to me - on the whole.
Relatively Sharp = Good
Slightly Blurry = Good (better anti aliasing)
Overly Sharp = Bad
Too blurry = Bad
Posted on Reply
#80
wolf
Better Than Native
beedooyou cannot have a debate in the face of such aggressive fanaticism!
Indeed, and personal preference really is king in all situations. Like some people like motion blur, some hate it, some like AA, some hate it, some people don't even play with shadows! Some games on VA monitors, some on IPS etc etc it's endless.

So I concur that often discussions just go absolutely nowhere, because neither side is willing to concede, and neither is really wrong in the sense that you are allowed to prefer whichever image you like.

One big problem with debating, specifically on the internet, is that people state their opinions and ‘personal truths’ as if they are facts - ‘things that are known or proven to be true’ - when they more often are not facts in that sense, it's just the truth as they see it.
Posted on Reply
#81
mtcn77
Most sharp filters incur heavy penalties in scores of undersampling artefacts. It is always attributed with a form of compromise. We should be aware of that before pointing the finger. It all comes down to where the compromise is going to be. Good filters are not computationally cheap, defeating their purpose.
Posted on Reply
#82
THU31
NVIDIA has Lanczos upscaling that can be enabled in NVIDIA Inspector. The downside is that the UI will be upscaled as well, because you have to set a lower resolution.
Posted on Reply
#83
mtcn77
Well, lanczos can be a good sequential filter after some intensity balancing filter like bilateral. We could arrive at solutions which mellow down lanczos' too much sharpening effect.
Posted on Reply
#84
InVasMani
I felt like a dilated filter combined with LCh blend at a low value had a nice effect. I think we'll see a lot of insertions of minor blend modes being combined with certain techniques that already exist to improve the overall results and mellow them out better.
Posted on Reply
#85
mtcn77
InVasManiI felt like a dilated filter combined with LCh blend at a low value had a nice effect. I think we'll see a lot of insertions of minor blend modes being combined with certain techniques that already exist to improve the overall results and mellow them out better.
I think what I like about superxbr is it compares its difference with a scaled image and only changes those pixels. Sounds simple, but works out like a charm. I've never seen anything quite like it in controlling ringing artifacts.
Posted on Reply
#86
InVasMani
It's great for 2D, but was never intended for 3D however and causes a stretching effect with 3D rendering. Really xBRZ is clever nearest neighbor dilated scaling filter for 2D.
Posted on Reply
#87
mtcn77
InVasManiIt's great for 2D, but was never intended for 3D however and causes a stretching effect with 3D rendering. Really xBRZ is clever nearest neighbor dilated scaling filter for 2D.
xBRZ is great, but I never said Z, I said superxbr. Which is different, though with the same spirit. It is essentially the spirit child of ringing artifacts. It compares a scaled image and makes changes accordingly. Like how a mipmap and a couple more anisotropic filtering(af) reads make up antialiasing, but this time it makes an anti-ringing filter.
I think I am quite certain superxbr 75/100 is the best for a ringing source(like a lanczos passed media) given that I've read a japanese blog on the subject. Text is the best litmus test in this regard.
Since we are in the same domain with MadVR, I think it is fair to say we could either run a prepass filter until the lanczos, or run a consecutive pass to denoise the image. It could take a couple of trajectories. We could filter intensities with bilateral before the sharpening noisy lanczos filter, or we could compare before and after images with superxbr and 'superxbr' it.
Such a good gesture of IHV's to take note of the MPCHC community. I'm very much enjoying it.
Posted on Reply
#88
Dredi
nguyenKinda hard to imagine doing that would actually compete with an A.I algorithm that systematically improving itself.
But it isn’t improving itself, though.
Posted on Reply
#89
nguyen
DrediBut it isn’t improving itself, though.


This is why manually replacing the DLSS 2.2 dll into DLSS 2.0 games often improve image quality, the neural network is continuously improving itself.
Sounds much more advanced than some guy trying out sharpen filters that have existed since the 80s doesn't it :roll: .
Posted on Reply
#90
Dredi
nguyen

This is why manually replacing the DLSS 2.2 dll into DLSS 2.0 games often improve image quality, the neural network is continuously improving itself.
Sounds much more advanced than some guy trying out sharpen filters that have existed since the 80s doesn't it :roll: .
If it’s improving by itself, why is updating the dll’s necessary? ;)
Posted on Reply
#91
nguyen
DrediIf it’s improving by itself, why is updating the dll’s necessary? ;)
because devs are lazy that they don't bother updating the new DLL.
No worry though it will happen with FSR where people will have to update new version themselves.
Posted on Reply
#92
mtcn77
nguyenbecause devs are lazy that they don't bother updating the new DLL.
No worry though it will happen with FSR where people will have to update new version themselves.
No, it is a superxbr variant through and through. Both come with their own rules, but superxbr is run on the cpu.
Posted on Reply
Add your own comment
Dec 4th, 2024 03:32 EST change timezone

New Forum Posts

Popular Reviews

Controversial News Posts