我正在从阴影贴图上的 DirectX SDK 示例中学习。这个示例在初始化期间创建了一个模板表面,并说:
Create the depth-stencil buffer to be used with the shadow map
We do this to ensure that the depth-stencil buffer is large
enough and has correct multisample type/quality when rendering
the shadow map. The default depth-stencil buffer created during
device creation will not be large enough if the user resizes the
window to a very small size. Furthermore, if the device is created
with multisampling, the default depth-stencil buffer will not
work with the shadow map texture because texture render targets
do not support multisample.
这是什么意思?我试图评论创建和操作模板缓冲区的语句,然后我得到了相当不稳定的结果:如果我让窗口更大,阴影效果很好,而当我让窗口更小时,阴影停止移动。有人可以向我解释吗?非常感谢!!!