Meet the modder who hacked AMD’s new upscaling tech into Cyberpunk 2077

Posted on

Previous this week, information broke of a modder that hacked AMD’s FSR 2.0 temporal upscaling era into Cyberpunk 2077, permitting customers of non-RTX graphics playing cards the risk to play the sport at upper frame-rates with considerably higher visible high quality than with FSR 1.0 upscaling. That is huge for homeowners of AMD GPUs, and the mod even works superbly on Steam Deck.

We contacted the mod’s author, the gloriously named PotatoOfDoom1337, to determine precisely the way it works – and whether or not it implies that FSR 2.0 will quickly be to be had in a tonne of current video games. Here is the interview, edited calmly for readability. Experience!

Alex Battaglia’s primer on FSR 2.0 displays off the function in God of Struggle, one in every of 3 launched FSR 2.0 video games.

What is your background in programming and sport modding? On NexusMods, it looks as if you may have most effective been developing mods since April remaining yr?

PotatoOfDoom: I’m finding out laptop science, have at all times been within the technical facet of video video games and used to be fascinated after I discovered about tasks like Reshade, Particular Okay or DXVK. I see programming as my favourite interest and moreover like opposite engineering and messing round with code so much. I made my first Cyberpunk 2077 mod as a result of CDPR mounted an overly a laugh trojan horse within the sport. This pissed off me such a lot that I downloaded the improvement equipment and re-implemented the trojan horse myself. The method of making this mod were given me hooked, I discovered extra concerning the sport over the years and began developing extra complicated mods.

What motivated you to take a look at to hack FSR 2.0 into Cyberpunk 2077?

PotatoOfDoom: Basically my getting older GTX 1080, a little of envy against RTX customers on account of their unique DLSS era, and interest about how transient upscaling answers paintings usually. Additionally, FSR 2.0 and DLSS had been described as being very an identical, so I simply sought after to peer if it used to be conceivable.

How did you broaden the mod?

PotatoOfDoom: I first of all began the mod a couple of weeks in the past in anticipation of the FSR 2.0 open supply free up. The primary steps had been to get the sport communicate to my customized .dll and inform the sport that it helps DLSS and record the to be had DLSS resolutions to the sport by means of enforcing the desired interfaces. Then I wrote a small shader that simply shows a clean crimson symbol. My objective used to be to make use of this as a base to make sure that the DirectX portions of my code had been running accurately. Then I simply waited for the open supply free up. After AMD launched the supply code, I right away changed my check code with FSR 2.0. I anticipated to paintings on it for a number of days, however used to be pleasantly shocked that it most effective took me a couple of hours to combine. I used debuggers like x64dbg and opposite engineering tool like IDA and Ghidra to seek out the specifics of the DLSS habits within the sport code. Additionally, for debugging the buffers, RenderDoc used to be extremely useful.

Please permit JavaScript to make use of our comparability equipment.

Here is how the mod seems in motion in Cyberpunk 2077 and Death Gentle 2, when put next with DLSS, FSR 1.0 and local 4K.

Had been there any surprises relating to issues being tougher or more uncomplicated to perform?

PotatoOfDoom: The principle DLSS and FSR enter buffers are the similar. I principally simply copied the FSR integration from the AMD instance, set the FoV/Intensity values, introduced the sport and right away were given a horny respectable symbol. The worst factor used to be a quirk in Cyberpunk the place the sport would not reset a unique DirectX construction (ComputeRootSignature) after operating DLSS. This isn’t so necessary for Nvidia’s DLSS because it makes use of CUDA, however sadly FSR makes use of strange DirectX compute shaders, which spoil the sport. So I needed to give you the option to revive that construction after operating FSR.

In the case of the FSR 2.0 CP2077 implementation, what is operating smartly at the present time and what must be mounted?

PotatoOfDoom: Ghosting and animated textures are the most important issues presently. Each DLSS and FSR use separate mask to provide the set of rules hints about whether or not to reuse outdated temporal subject material or discard it, however they aren’t suitable and I wish to create a shader that interprets the DLSS mask into FSR mask.

DLSS and FSR mask… are they very similar to a Photoshop masks?

PotatoOfDoom: Yeah, principally like that. You’ll consider them as a greyscale symbol with values starting from 0.0 to one.0 and the temporal upscaler reprojects outdated frames relying on the ones values. The FSR documentation is going into extra intimately about that.

Here is a visible instance. I threw a fireplace grenade in the street, and as you’ll be able to see there’s not anything within the movement vectors or within the intensity buffer. This is as a result of neither the 2D hearth texture, nor the spark debris have a 3-D illustration within the sport. To be sure that the small sparks don’t reason unpleasant strains, they’re masked within the InputBiasColorMask in order that the reprojection set of rules ignores those pixels and does no longer reproject anything else at that location.

Do FSR 2.0 and DLSS have an identical necessities relating to what inputs they require?

PotatoOfDoom: Sure, another way this mod would no longer be conceivable. Each integrations want colour, movement vectors and a intensity buffer as enter. As well as, they use the mask I discussed previous. They’re essential for issues that do not have movement vectors, like debris or animated textures like smoke and laptop monitors within the sport and wrongly carried out mask are the principle reason why for ghosting showing in a sport. Additionally, FSR wishes to understand the FOV and the close to and a long way planes of the intensity buffer. DLSS does not want that additional info (I suppose it figures that out by way of the built-in ML set of rules).

With what you realize now, how simple would it not be to broaden a an identical answer for different DLSS video games?

PotatoOfDoom: Sure, I believe so. I’m nonetheless no longer completed with this one but when different video games are an identical this in point of fact mustn’t take longer than a couple of days in keeping with sport. I have already executed some preliminary assessments with Demise Stranding and the primary effects glance superb.

As an example, may just FSR 2.0 be added to Regulate, a sport that famously runs extraordinarily poorly on AMD GPUs, even with RT disabled?

PotatoOfDoom: Sure, I believe so. Regulate were given up to date to DLSS 2.0 because of this the DLSS interface the sport communicates with is identical or is a minimum of similar to Cyberpunk. That is crucial phase.

Given the huge public pastime within the mod, what are your plans going ahead? Would you be open to different devs becoming a member of the mission to beef up the consequences, or enforce an identical mods for different video games?

PotatoOfDoom: I in point of fact did not be expecting this a lot pastime in my mod, and if I had identified that, I’d have ready a little extra after I hit the post button remaining Thursday. I need to end Cyberpunk first (if the actual devs don’t seem to be sooner than me XD) after which transfer directly to different DLSS video games. And sure, after all I would like different builders to enroll in me and lend a hand me get this mission out of the proof-of-concept degree sooner and into one thing other folks can use. I heard there’s already anyone who needs to port my mod to Purple Lifeless Redemption 2.

The mod's official image is a Photoshop masterpiece - wow, so graphics.

Wow, so graphics. The mod’s reliable symbol is a masterpiece.

Will or not it’s conceivable to create a drop-in DLSS alternative that works throughout a spread of video games (‘dlss2fsr’, as recommended by means of a Github person) or do you spot it being extra of a sequence of mods every adapted to a given sport?

PotatoOfDoom: Best with a couple of compromises. It might be conceivable to create some roughly mod that will get the FoV and Intensity values from a easy ini document. This mod may just paintings for nearly any DLSS sport, however the symbol high quality may not be as excellent because it may well be. I imply even Nvidia optimizes DLSS for positive video games. As an example, the primary variations of DLSS had horrible ghosting in Cyberpunk, whilst later updates to DLSS progressed the placement. I will’t talk for different video games, however as an example Cyberpunk by accident sends the item ID buffer to DLSS (which is a buffer that assigns a unmarried colour price to every object within the scene). DLSS does not want this buffer and cannot do anything else with this data, however this permits me to beef up anti-ghosting (particularly when riding) significantly. Additionally, the ComputeRootSignature trojan horse I discussed previous is exclusive to Cyberpunk and makes this model of the FSR mod incompatible with another sport. Each and every unmarried sport has some distinctive quirks and even insects that make it necessary to optimize every sport to get the most efficient enjoy. I clearly cannot do one thing like this for each unmarried sport, however I believe if there’s some roughly DLSS2FSR framework, it must be conceivable for different builders with some programming enjoy to simply combine and optimize FSR for different DLSS video games.

Anything that you would love to proportion concerning the procedure of constructing the mod, or that you would like other folks to find out about?

PotatoOfDoom: I believe my solutions above must duvet the entirety concerning the mod for now. This mod is just a few days outdated and is already so smartly gained. I am certain we will see a ton of thrilling traits within the upcoming weeks. Keep tuned for extra.

Thrilling stuff certainly! Since this interview happened, every other contributor by means of the ID of mnnx effectively tailored the mod for Death Gentle 2, and I would be expecting to peer many extra video games supported over the following couple of weeks if the entirety is going smartly. Due to PotatoOfDoom for his or her time developing the mod and chatting with us!

If you are all for making an attempt the mod out for your self, you’ll be able to in finding it on NexusMods. Set up is beautiful easy – substitute a couple of recordsdata on your CP2077 listing, and make a registry exchange. You’ll additionally apply the mod’s construction on PotatoOfDoom’s GitHub repository.

Leave a Reply

Your email address will not be published. Required fields are marked *