1

I have been developing this game in C++ in Visual Studio using DirectX 12. I used the Debug build configuration during development and the graphics were smooth as butter.

When I was preparing to publish the game on the Windows Store so I could share it with friends as play testers, I switched to Release build configuration. As soon as I did that I started getting this flicker of the back-ground color coming through my wall meshes.

Here is a short video that shows the flicker. Here is a longer video that I made before switching to Release build configuration that shows there is no flicker.

I am new to DirectX 12. This project was my teacher. I studied Microsoft's Direct3D 12 Graphics, and I studied the DirectX 12 templates in Visual Studio. I felt quite pleased that I was able to master DirectX 12 well enough to produce this game as well as I did. Then the Release thing, and the flicker thing, and I am at a loss.

Is this likely to be a shader issue? or a command queue issue? or a texture issue? or something else?

4

1 回答 1

3

DirectX 12 是为图形专家设计的 API,与 Direct3D 11 相比,它提供了大量的应用程序控制。该控制的代价是应用程序开发人员负责正确处理所有内容,确保它适用于广泛的硬件,并自己强大地处理压力场景和错误情况。

您可以通过多种方式在 DirectX 12 中获得“闪烁”效果。一种常见的方法是无法在调用Draw时间和在 GPU 上完成实际绘制之间保持图形内存的常量、IB、VB 等不变这通常会在几帧之后发生。这种同步是正确使用 API 的关键挑战。有关示例解决方案,请参阅GraphicsMemoryDirectX Tool Kit for DirectX 12

如果您是 DirectX 开发的新手,我强烈建议您从 DirectX 11 开始。它的功能基本相同,但需要处理缓冲区重命名、资源障碍、栅栏、VRAM 过度使用等。

于 2017-11-14T17:56:35.137 回答