dx12中rendertarget大小匹配导致的一个bug

比较有意思。
问题是如果depth stencil大小和color render target大小不一样,比如depth stencil大小比较小,那么画一个全屏quad,就只能覆盖其中一部分
在这里插入图片描述
比如上图中,只画了一部分,原因就是depth stencil 的resolution其实更小。

做法上,可以选择在渲染底层实现一个check:drawcall之前对size做一个匹配检查,color rt的size要<=depth stencil rt size;

发布了780 篇原创文章 · 获赞 460 · 访问量 165万+

猜你喜欢

转载自blog.csdn.net/ccanan/article/details/102308736