找回密码
 加入我们
搜索
      
查看: 10274|回复: 8

[游戏电玩] 专访PotatoOfDoom:《2077》非官方FSR 2.0 MOD作者

[复制链接]
发表于 2022-7-4 22:09 | 显示全部楼层 |阅读模式
本帖最后由 埃律西昂 于 2022-7-17 14:22 编辑

来源:Eurogamer.net
原英文标题:《Meet the modder who hacked AMD's new upscaling tech into Cyberpunk 2077——Could all games with DLSS have FSR 2.0 soon?》
前见:《<赛博朋克 2077>迎来 FSR 2.0 Mod:替代 DLSS,适配更多显卡,实测游戏帧数翻倍





Earlier this week, news broke of a modder that hacked AMD's FSR 2.0 temporal upscaling technology into Cyberpunk 2077, allowing users of non-RTX graphics cards the chance to play the game at higher frame-rates with substantially better visual quality than with FSR 1.0 upscaling. That's massive for owners of AMD GPUs, and the mod even works beautifully on Steam Deck.
本周早些时候,有消息称,一个模组开发者将AMD的FSR 2.0时间升级技术黑客化为Cyberpunk 2077,使非RTX显卡的用户有机会以更高的帧速率玩游戏,并且视觉质量比FSR 1.0升级要好得多。对于AMD GPU的所有者来说,这是巨大的,该mod甚至可以在Steam Deck上很好地工作。

We contacted the mod's creator, the gloriously named PotatoOfDoom1337, to find out exactly how it works - and whether it means that FSR 2.0 will soon be available in a tonne of existing games. Here's the interview, edited lightly for clarity. Enjoy!
我们联系了该模组的创造者PotatoOfDoom1337,以了解它是如何工作的 - 以及这是否意味着FSR 2.0将很快在大量现有游戏中推出。这是采访,为了清晰起见,略微编辑了一下。享受!

What's your background in programming and game modding? On NexusMods, it looks like you've only been creating mods since April last year?
您在编程和游戏模组方面的背景是什么?在NexusMods上,看起来你从去年四月才开始创建mods?

PotatoOfDoom: I am studying computer science, have always been interested in the technical aspect of video games and was fascinated when I learned about projects like Reshade, Special K or DXVK. I see programming as my favorite hobby and additionally like reverse engineering and messing around with code a lot. I made my first Cyberpunk 2077 mod because CDPR fixed a very fun bug in the game. This annoyed me so much that I downloaded the development tools and re-implemented the bug myself. The process of creating this mod got me hooked, I learned more about the game over time and started creating more complex mods.
PotatoOfDoom:我正在学习计算机科学,一直对视频游戏的技术方面感兴趣,当我了解Reshade,Special K或DXVK等项目时,我着迷。我认为编程是我最喜欢的爱好,此外还喜欢逆向工程和经常打乱代码。我制作了我的第一个赛博朋克2077 mod,因为CDPR修复了游戏中一个非常有趣的错误。这让我非常恼火,以至于我下载了开发工具并自己重新实现了该错误。创建这个模组的过程让我着迷,随着时间的推移,我对游戏有了更多的了解,并开始创建更复杂的模组。

What motivated you to try to hack FSR 2.0 into Cyberpunk 2077?
是什么促使你尝试将FSR 2.0装载到《Cyberpunk 2077》?

PotatoOfDoom: Mainly my aging GTX 1080, a bit of envy towards RTX users because of their exclusive DLSS technology, and curiosity about how temporary upscaling solutions work in general. Also, FSR 2.0 and DLSS were described as being very similar, so I just wanted to see if it was possible.
PotatoOfDoom:主要是我老化的GTX 1080,由于RTX用户独有的DLSS技术,我对RTX用户有点羡慕,并且对临时升级解决方案的工作原理感到好奇。此外,FSR 2.0和DLSS被描述为非常相似,所以我只想看看它是否可能。

How did you develop the mod?
你是怎么开发这个模组的?

PotatoOfDoom: I initially started the mod a few weeks ago in anticipation of the FSR 2.0 open source release. The first steps were to get the game talk to my custom .dll and tell the game that it supports DLSS and report the available DLSS resolutions to the game by implementing the required interfaces. Then I wrote a small shader that just displays a blank red image. My goal was to use this as a base to verify that the DirectX parts of my code were working correctly. Then I just waited for the open source release. After AMD released the source code, I immediately replaced my test code with FSR 2.0. I expected to work on it for several days, but was pleasantly surprised that it only took me a few hours to integrate. I used debuggers like x64dbg and reverse engineering software like IDA and Ghidra to find the specifics of the DLSS behavior in the game code. Also, for debugging the buffers, RenderDoc was incredibly helpful.
PotatoOfDoom:我最初在几周前开始制作这个mod,期待FSR 2.0开源版本。第一步是让游戏与我的自定义.dll对话,并告诉游戏它支持DLSS,并通过实现所需的接口向游戏报告可用的DLSS分辨率。然后我写了一个小着色器,只显示一个空白的红色图像。我的目标是以此为基础来验证代码的 DirectX 部分是否正常工作。然后我只是等待开源版本。AMD发布源代码后,我立即将测试代码替换为FSR 2.0。我本以为要花几天时间研究它,但令我惊喜的是,它只花了几个小时来集成。我使用x64dbg等调试器和IDA和Ghidra等逆向工程软件来查找游戏代码中DLSS行为的细节。此外,对于调试缓冲区,RenderDoc非常有用。

Were there any surprises in terms of things being harder or easier to accomplish?
在事情更难或更容易完成方面有什么惊喜吗?

PotatoOfDoom: The main DLSS and FSR input buffers are the same. I basically just copied the FSR integration from the AMD example, set the FoV/Depth values, launched the game and immediately got a pretty decent image. The worst thing was a quirk in Cyberpunk where the game wouldn't reset a special DirectX structure (ComputeRootSignature) after running DLSS. This is not so important for Nvidia's DLSS since it uses CUDA, but unfortunately FSR uses ordinary DirectX compute shaders, which break the game. So I had to find a way to restore that structure after running FSR.
PotatoOfDoom:主要的DLSS和FSR输入缓冲区是相同的。我基本上只是从AMD示例中复制了FSR集成,设置了FoV / Depth值,启动了游戏并立即获得了相当不错的图像。最糟糕的是赛博朋克中的一个怪癖,游戏在运行DLSS后不会重置特殊的DirectX结构(ComputeRootSignature)。这对于Nvidia的DLSS来说并不那么重要,因为它使用CUDA,但不幸的是,FSR使用普通的DirectX计算着色器,这打破了游戏。因此,我必须找到一种方法在运行 FSR 后恢复该结构。

In terms of the FSR 2.0 CP2077 implementation, what is working well at the moment and what needs to be fixed?
就FSR 2.0在《CP2077》的实施而言,目前哪些方面运行良好,哪些方面需要修复?

PotatoOfDoom: Ghosting and animated textures are the biggest problems right now. Both DLSS and FSR use separate masks to give the algorithm hints about whether to reuse old temporal material or discard it, but they don't seem to be compatible and I need to create a shader that translates the DLSS masks into FSR masks.
PotatoOfDoom:重影和动画纹理是目前最大的问题。DLSS 和 FSR 都使用单独的遮罩来为算法提供关于是重用旧的时态材质还是丢弃它的提示,但它们似乎不兼容,我需要创建一个着色器,将 DLSS 蒙版转换为 FSR 蒙版。

DLSS and FSR masks... are they similar to a Photoshop mask?
DLSS 和 FSR 蒙版...它们是否类似于Photoshop蒙版?

PotatoOfDoom: Yeah, basically like that. You can imagine them as a greyscale image with values ranging from 0.0 to 1.0 and the temporal upscaler reprojects old frames depending on those values. The FSR documentation goes into more in detail about that.
PotatoOfDoom:是的,基本上是这样的。您可以将它们想象为值范围为 0.0 到 1.0 的灰度图像,并且时域图像放大器会根据这些值重新投影旧帧。FSR文档对此进行了更详细的介绍

Do FSR 2.0 and DLSS have similar requirements in terms of what inputs they require?
FSR 2.0 和 DLSS 在需要哪些输入方面是否有类似的要求?

PotatoOfDoom: Yes, otherwise this mod would not be possible. Both integrations need color, motion vectors and a depth buffer as input. In addition, they use the masks I mentioned earlier. They are very important for things that don't have motion vectors, like particles or animated textures like smoke and computer screens in the game and wrongly applied masks are the main reason for ghosting appearing in a game. Also, FSR needs to know the FOV and the near and far planes of the depth buffer. DLSS doesn't need that additional information (I guess it figures that out via the integrated ML algorithm).
PotatoOfDoom:是的,否则这个mod是不可能的。两个集成都需要颜色、运动矢量和深度缓冲区作为输入。此外,他们使用我之前提到的面具。它们对于没有运动矢量的东西非常重要,例如粒子或动画纹理,如游戏中的烟雾和计算机屏幕,错误应用的蒙版是游戏中出现重影的主要原因。此外,FSR 还需要知道 FOV 以及深度缓冲区的**面和远平面。DLSS不需要额外的信息(我猜它通过集成的ML算法计算出来)。

With what you know now, how easy would it be to develop a similar solution for other DLSS games?
根据您现在所知道的,为其他DLSS游戏开发类似的解决方案有多容易?

PotatoOfDoom: Yes, I think so. I am still not finished with this one but if other games are similar this really shouldn't take longer than a few days per game. I've already done some initial tests with Death Stranding and the first results look very good.
PotatoOfDoom:是的,我认为是的。我还没有完成这个,但如果其他游戏是类似的,这不应该超过每个游戏几天的时间。我已经用《死亡搁浅》做了一些初步测试,第一个结果看起来非常好。

For example, could FSR 2.0 be added to Control, a game that famously runs extremely poorly on AMD GPUs, even with RT disabled?
例如,FSR 2.0是否可以添加到Control中,这是一款在AMD GPU上运行极差的游戏,即使禁用了RT?

PotatoOfDoom: Yes, I think so. Control got updated to DLSS 2.0 which means the DLSS interface the game communicates with is the same or is at least very similar to Cyberpunk. This is the most important part.
PotatoOfDoom:是的,我认为是的。控件更新为DLSS 2.0,这意味着游戏与之通信的DLSS界面与赛博朋克相同或至少非常相似。这是最重要的部分。

Given the massive public interest in the mod, what are your plans going forward? Would you be open to other devs joining the project to improve the results, or implement similar mods for other games?
鉴于公众对Mod的大量兴趣,您未来的计划是什么?您是否愿意让其他开发人员加入该项目以改善结果,或者为其他游戏实现类似的模组?

PotatoOfDoom: I really didn't expect this much interest in my mod, and if I had known that, I would have prepared a bit more when I hit the publish button last Thursday. I want to finish Cyberpunk first (if the real devs aren't faster than me XD) and then move on to other DLSS games. And yes, of course I would love other developers to join me and help me get this project out of the proof-of-concept stage faster and into something people can use. I heard there is already someone who wants to port my mod to Red Dead Redemption 2.
PotatoOfDoom:我真的没想到对我的mod有这么大的兴趣,如果我知道这一点,当我上周四点击发布按钮时,我会准备更多。我想先完成赛博朋克(如果真正的开发人员不比我快XD),然后转到其他DLSS游戏。是的,我当然希望其他开发人员加入我,帮助我更快地将这个项目从概念验证阶段中解脱出来,并成为人们可以使用的东西。我听说已经有人想将我的mod移植到Red Dead Redemption 2。



Will it be possible to create a drop-in DLSS replacement that works across a range of games ('dlss2fsr', as suggested by a Github user) or do you see it being more of a series of mods each tailored to a given game?
是否有可能创建一个适用于各种游戏的嵌入式DLSS替代品(“dlss2fsr”,正如Github用户所建议的那样),或者你认为它更像是一系列针对给定游戏量身定制的模组?

PotatoOfDoom: Only with a few compromises. It would be possible to create some kind of mod that gets the FoV and Depth values from a simple ini file. This mod could work for almost any DLSS game, but the image quality might not be as good as it could be. I mean even Nvidia optimizes DLSS for certain games. For example, the first versions of DLSS had terrible ghosting in Cyberpunk, while later updates to DLSS improved the situation. I can't speak for other games, but for example Cyberpunk unintentionally sends the object ID buffer to DLSS (which is a buffer that assigns a single color value to each object in the scene). DLSS doesn't need this buffer and can't do anything with this information, but this allows me to improve anti-ghosting (especially when driving) tremendously. Also, the ComputeRootSignature bug I mentioned earlier is unique to Cyberpunk and makes this version of the FSR mod incompatible with any other game. Every single game has some unique quirks or even bugs that make it important to optimize each game to get the best experience. I obviously can't do something like this for every single game, but I think if there is some kind of DLSS2FSR framework, it should be possible for other developers with some programming experience to easily integrate and optimize FSR for other DLSS games.
PotatoOfDoom:需要一定量的妥协才有可能。可以创建某种从简单的ini文件获取FoV和深度值的mod。这个mod几乎可以适用于任何DLSS游戏,但图像质量可能不如它那么好。我的意思是,即使是英伟达也为某些游戏优化了DLSS。例如,DLSS的第一个版本在赛博朋克中具有可怕的重影,而后来对DLSS的更新改善了这种情况。我不能代表其他游戏,但例如,Cyberpunk无意中将对象ID缓冲区发送到DLSS(DLSS是一个缓冲区,为场景中的每个对象分配一个颜色值)。DLSS不需要这个缓冲区,也不能对这些信息做任何事情,但这可以让我极大地改善防重影(特别是在驾驶时)。此外,我之前提到的ComputeRootSignature错误是赛博朋克独有的,它使这个版本的FSR模组与任何其他游戏不兼容。每个游戏都有一些独特的怪癖甚至错误,这使得优化每个游戏以获得最佳体验变得非常重要。我显然不能为每款游戏都做这样的事情,但我认为如果有某种DLSS2FSR框架,其他有编程经验的开发者应该可以轻松地为其他DLSS游戏集成和优化FSR。

Anything else that you'd like to share about the process of making the mod, or that you'd like people to know about?
关于制作模组的过程,你还有什么想分享的,或者你想让人们知道的吗?

PotatoOfDoom: I think my answers above should cover everything about the mod for now. This mod is only a few days old and is already so well received. I'm sure we'll see a ton of exciting developments in the upcoming weeks. Stay tuned for more.
PotatoOfDoom:我认为我上面的答案现在应该涵盖有关mod的所有内容。这个mod只有几天的历史,已经很受欢迎。我相信在未来几周内,我们将看到大量令人兴奋的发展。请继续关注更多内容。

Exciting stuff indeed! Since this interview took place, another contributor by the ID of mnxn successfully adapted the mod for Dying Light 2, and I'd expect to see many more games supported over the next few weeks if everything goes well. Thanks to PotatoOfDoom for their time creating the mod and talking to us!
确实令人兴奋!自从这次采访以来,mnxn的另一位贡献者成功地改编了《消逝的光芒2》的mod,如果一切顺利,我希望在接下来的几周内看到更多的游戏得到支持。感谢PotatoOfDoom花时间创建mod并与我们交谈!

If you're interested in trying the mod out for yourself, you can find it on NexusMods. Installation is pretty straightforward - replace a few files in your CP2077 directory, and make a registry change. You can also follow the mod's development on PotatoOfDoom's GitHub repository.
如果您有兴趣亲自尝试该mod,可以在NexusMods上找到它。安装非常简单 - 替换《CP2077》目录中的几个文件,然后进行注册表更改。你也可以在PotatoOfDoom的GitHub存储库上关注mod的开发。

评分

参与人数 1邪恶指数 +20 收起 理由
灯下狐 + 20

查看全部评分

发表于 2022-7-5 00:06 | 显示全部楼层
思路值得赞赏
发表于 2022-7-5 08:06 | 显示全部楼层
这个可以有
发表于 2022-7-5 09:10 | 显示全部楼层
一直没玩2077 准备等所有dlc都出完了 不再更新了 再从头开始好好的玩
发表于 2022-7-5 09:21 | 显示全部楼层
这真是大佬,以前有个类似想法,都没付诸行动
发表于 2022-7-5 11:28 | 显示全部楼层
ioril 发表于 2022-7-5 09:10
一直没玩2077 准备等所有dlc都出完了 不再更新了 再从头开始好好的玩

哈哈哈 怎么跟我想的一样!
发表于 2022-7-5 13:42 | 显示全部楼层
iampker 发表于 2022-7-5 11:28
哈哈哈 怎么跟我想的一样!

我基本上所有游戏都是这么玩的 刚开始出来的时候虽然热度很高但是不玩 等所有补丁 DLC都出全了 再慢慢品味  反正游戏有的是 也玩不玩  而且刚出来的游戏配置要求都很高 过个三四年 硬件升级了 可以全特效爽玩了
发表于 2022-7-5 23:47 | 显示全部楼层
ioril 发表于 2022-7-5 13:42
我基本上所有游戏都是这么玩的 刚开始出来的时候虽然热度很高但是不玩 等所有补丁 DLC都出全了 再慢慢品 ...

内容是一款好游戏,可惜被bug和优化毁了。
发表于 2022-7-10 14:55 | 显示全部楼层
ioril 发表于 2022-7-5 09:10
一直没玩2077 准备等所有dlc都出完了 不再更新了 再从头开始好好的玩

metoo,成熟男人玩游戏的方式
您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

Archiver|手机版|小黑屋|Chiphell ( 沪ICP备12027953号-5 )沪公网备310112100042806 上海市互联网违法与不良信息举报中心

GMT+8, 2024-12-22 17:16 , Processed in 0.013824 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2007-2024 Chiphell.com All rights reserved.

快速回复 返回顶部 返回列表