游戏开发:OpenGL 和 DirectX 自动测试

发布于 2024-12-25 06:11:35 字数 144 浏览 2 评论 0原文

我正在写关于自动可移植性测试的硕士论文,想知道游戏开发人员在开发同时支持 OpenGL 和 DirectX 的游戏时是否有自动测试软件?理论上,人们可以在游戏中自动运行特定序列期间记录屏幕并分析 OpenGL 和 DirectX 记录,但是否存在某些技术方面使这成为不可能?

I'm writing my Master's thesis on automatic portability testing and was wondering whether there were any automatic testing software for game developers when they're developing a game with both OpenGL and DirectX support? Theoretically one could record the screen during the automatic run of a specific sequence in the game and analyze both OpenGL and DirectX recordings but is there some technical aspect which makes this impossible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

怎言笑 2025-01-01 06:11:35

我能想到的最接近的事情是 Wine 中的测试,它沿着这些思路做一些事情。

不幸的是,像这样的正确测试是不可能的。测试过于依赖系统状态,并且不能保证实现是像素相同的。 DirectX 确实提供了参考实现,可用于许多测试用途,但我不知道 OpenGL 的等效项。

录制屏幕会引入更多错误,具体取决于其执行方式。我见过的测试渲染图像,然后根据纹理数据进行工作(类似于屏幕记录,但在单帧上并且可能更精确)。尽管如此,整个过程还是容易出现相当多的错误,而且速度可能会很慢。

The closest thing I can think of are the tests in Wine, which do something along these lines.

Unfortunately, proper testing like this isn't possible; the tests are far too dependent on system state and implementations aren't guaranteed to be pixel-identical. DirectX does offer the reference implementation, which can be used for many testing uses, but I don't know of an OpenGL equivalent.

Recording the screen introduces even more error, depending on how it's performed. The tests I've seen render an image, then work from the texture data (similar to screen recording, but on a single frame and potentially more precise). Still, the whole thing is prone to quite a bit of error and can be slow.

早茶月光 2025-01-01 06:11:35

从你的问题中我可以看出,你正在尝试比较 OpenGL 和 DirectX 渲染器的渲染结果,渲染相同的场景。

我唯一能想到的就是将场景渲染到两个渲染器中的纹理,然后将它们保存为未压缩的以供以后比较,或者使用一个中间渲染路径,该路径同时采用纹理和着色器将每个像素的差异渲染到另一个渲染器中稍后评估纹理。

然而,在我看来,这种比较的有用性是值得商榷的,因为很难自动判断错误是否只是实现中的轻微差异或实际可见的伪影,更不用说评估错误对用户感知的重要性了。

这已经假设您能够让两个渲染器以完全相同的帧速率和相机位置运行,但这不太可能。

我猜你的错误图像中会有很多噪音和偏移,需要考虑到实际找到任何有用的信息(如果有的话)。

From what I can tell from your question, you are trying to compare the rendering results of an OpenGL and a DirectX renderer, rendering the same scene.

The only thing I can think of to do that is rendering the scene to textures in both renderers and either save them uncompressed for later comparison or have an intermediate render path that takes both textures and a shader to render the per-pixel-difference into another texture to be evaluated later.

However, the usefulness of such a comparison is debatable in my opinion as it's hard to automatically tell if an error is just a slight discrepancy in implementation or an actually visible artifact, let alone evaluating the importance of an error regarding the users perception.

And this already assumes you are able to have both renderers run at exactly the same frame rate and camera position, which is unlikely.

I guess you would have a lot of noise and offset in your error images to account for to actually find any useful information, if at all.

嘦怹 2025-01-01 06:11:35

我知道大约 15(?) 年前针对不同图形芯片进行了屏幕比较,我猜您需要搜索图像质量指标。

I know that screen comparisons where done some 15 (?) years ago for different graphic chips, you would need to search for image quality metrics, I guess.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文