HomeMobileMeet the modder who hacked AMD's new upscaling tech into Cyberpunk 2077

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

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

We contacted the mod’s creator, the gloriously named PotatoOfDoom1337, to search out out precisely the way it works – and whether or not it implies that FSR 2.0 will quickly be obtainable in a tonne of current video games. This is the interview, edited frivolously for readability. Get pleasure from!

Alex Battaglia’s primer on FSR 2.0 exhibits off the characteristic in God of Conflict, considered one of three launched FSR 2.0 video games.

What’s your background in programming and recreation modding? On NexusMods, it appears such as you’ve solely been creating mods since April final 12 months?

PotatoOfDoom: I’m finding out laptop science, have at all times been within the technical facet of video video games and was fascinated after I realized about initiatives like Reshade, Particular Ok or DXVK. I see programming as my favourite pastime and moreover like reverse engineering and messing round with code loads. I made my first Cyberpunk 2077 mod as a result of CDPR mounted a really enjoyable bug within the recreation. This irritated me a lot that I downloaded the event instruments and re-implemented the bug myself. The method of making this mod obtained me hooked, I realized extra concerning the recreation over time and began creating extra advanced mods.

What motivated you to attempt to hack FSR 2.0 into Cyberpunk 2077?

PotatoOfDoom: Primarily my getting old GTX 1080, a little bit of envy in the direction of RTX customers due to their unique DLSS expertise, and curiosity about how non permanent upscaling options work basically. Additionally, FSR 2.0 and DLSS have been described as being very comparable, so I simply wished to see if it was attainable.

How did you develop the mod?

PotatoOfDoom: I initially began the mod a number of weeks in the past in anticipation of the FSR 2.0 open supply launch. The primary steps have been to get the sport discuss to my customized .dll and inform the sport that it helps DLSS and report the obtainable DLSS resolutions to the sport by implementing the required interfaces. Then I wrote a small shader that simply shows a clean pink picture. My purpose was to make use of this as a base to confirm that the DirectX components of my code have been working appropriately. Then I simply waited for the open supply launch. After AMD launched the supply code, I instantly changed my take a look at code with FSR 2.0. I anticipated to work on it for a number of days, however was pleasantly shocked that it solely took me a number of hours to combine. I used debuggers like x64dbg and reverse engineering software program like IDA and Ghidra to search out the specifics of the DLSS habits within the recreation code. Additionally, for debugging the buffers, RenderDoc was extremely useful.

Please allow JavaScript to make use of our comparability instruments.

This is how the mod appears in motion in Cyberpunk 2077 and Dying Mild 2, in contrast with DLSS, FSR 1.0 and native 4K.

Had been there any surprises by way of issues being tougher or simpler to perform?

PotatoOfDoom: The principle DLSS and FSR enter buffers are the identical. I principally simply copied the FSR integration from the AMD instance, set the FoV/Depth values, launched the sport and instantly obtained a reasonably respectable picture. The worst factor was a quirk in Cyberpunk the place the sport would not reset a particular 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 bizarre DirectX compute shaders, which break the sport. So I needed to discover a strategy to restore that construction after operating FSR.

When it comes to the FSR 2.0 CP2077 implementation, what’s working nicely in the intervening time and what must be mounted?

PotatoOfDoom: Ghosting and animated textures are the most important issues proper now. Each DLSS and FSR use separate masks to offer the algorithm hints about whether or not to reuse outdated temporal materials or discard it, however they aren’t suitable and I have to create a shader that interprets the DLSS masks into FSR masks.

DLSS and FSR masks… are they just like a Photoshop masks?

PotatoOfDoom: Yeah, principally like that. You possibly can think about them as a greyscale picture with values starting from 0.0 to 1.0 and the temporal upscaler reprojects outdated frames relying on these values. The FSR documentation goes into extra intimately about that.

This is a visible instance. I threw a fireplace grenade on the road, and as you’ll be able to see there’s nothing within the movement vectors or within the depth buffer. That’s as a result of neither the 2D hearth texture, nor the spark particles have a 3D illustration within the recreation. To make sure that the small sparks don’t trigger unpleasant traces, they’re masked within the InputBiasColorMask in order that the reprojection algorithm ignores these pixels and doesn’t reproject something at that location.

Do FSR 2.0 and DLSS have comparable necessities by way of what inputs they require?

PotatoOfDoom: Sure, in any other case this mod wouldn’t be attainable. Each integrations want shade, movement vectors and a depth buffer as enter. As well as, they use the masks I discussed earlier. They’re crucial for issues that do not have movement vectors, like particles or animated textures like smoke and laptop screens within the recreation and wrongly utilized masks are the primary purpose for ghosting showing in a recreation. Additionally, FSR must know the FOV and the close to and much planes of the depth buffer. DLSS does not want that further data (I suppose it figures that out through the built-in ML algorithm).

With what you understand now, how straightforward would it not be to develop an analogous answer for different DLSS video games?

PotatoOfDoom: Sure, I believe so. I’m nonetheless not completed with this one but when different video games are comparable this actually should not take longer than a number of days per recreation. I’ve already completed some preliminary checks with Demise Stranding and the primary outcomes look superb.

For instance, may FSR 2.0 be added to Management, a recreation that famously runs extraordinarily poorly on AMD GPUs, even with RT disabled?

PotatoOfDoom: Sure, I believe so. Management obtained up to date to DLSS 2.0 which implies the DLSS interface the sport communicates with is identical or is a minimum of similar to Cyberpunk. That is crucial half.

Given the huge public curiosity within the mod, what are your plans going ahead? Would you be open to different devs becoming a member of the venture to enhance the outcomes, or implement comparable mods for different video games?

PotatoOfDoom: I actually did not anticipate this a lot curiosity in my mod, and if I had recognized that, I’d have ready a bit extra after I hit the publish button final Thursday. I need to end Cyberpunk first (if the true devs aren’t quicker than me XD) after which transfer on to different DLSS video games. And sure, in fact I’d love different builders to hitch me and assist me get this venture out of the proof-of-concept stage quicker and into one thing folks can use. I heard there’s already somebody who needs to port my mod to Pink Lifeless Redemption 2.

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

Wow, so graphics. The mod’s official picture is a masterpiece.

Will or not it’s attainable to create a drop-in DLSS substitute that works throughout a variety of video games (‘dlss2fsr’, as prompt by a Github consumer) or do you see it being extra of a sequence of mods every tailor-made to a given recreation?

PotatoOfDoom: Solely with a number of compromises. It might be attainable to create some type of mod that will get the FoV and Depth values from a easy ini file. This mod may work for nearly any DLSS recreation, however the picture high quality won’t be pretty much as good because it might be. I imply even Nvidia optimizes DLSS for sure video games. For instance, the primary variations of DLSS had horrible ghosting in Cyberpunk, whereas later updates to DLSS improved the state of affairs. I can not communicate for different video games, however for instance Cyberpunk unintentionally sends the item ID buffer to DLSS (which is a buffer that assigns a single shade worth to every object within the scene). DLSS does not want this buffer and might’t do something with this data, however this permits me to enhance anti-ghosting (particularly when driving) tremendously. Additionally, the ComputeRootSignature bug I discussed earlier is exclusive to Cyberpunk and makes this model of the FSR mod incompatible with every other recreation. Each single recreation has some distinctive quirks and even bugs that make it necessary to optimize every recreation to get the perfect expertise. I clearly cannot do one thing like this for each single recreation, however I believe if there’s some type of DLSS2FSR framework, it needs to be attainable for different builders with some programming expertise to simply combine and optimize FSR for different DLSS video games.

The rest that you just’d prefer to share concerning the course of of creating the mod, or that you just’d like folks to find out about?

PotatoOfDoom: I believe my solutions above ought to cowl all the pieces concerning the mod for now. This mod is just a few days outdated and is already so nicely acquired. I am certain we’ll see a ton of thrilling developments within the upcoming weeks. Keep tuned for extra.

Thrilling stuff certainly! Since this interview happened, one other contributor by the ID of mnnx efficiently tailored the mod for Dying Mild 2, and I would anticipate to see many extra video games supported over the following few weeks if all the pieces goes nicely. Because of PotatoOfDoom for his or her time creating the mod and speaking to us!

In the event you’re eager about making an attempt the mod out for your self, you could find it on NexusMods. Set up is fairly simple – exchange a number of information in your CP2077 listing, and make a registry change. You can even observe the mod’s growth on PotatoOfDoom’s GitHub repository.

Source link



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments