这是一道在<Introduction to 3D Game Programming with DirectX 11>上的练习题. 要求把某个像素点上的Depth Complexity(深度复杂度?)可视化输出.Depth Complexity即某个点上有多少次depth test. 根据题目中的提示,我们可以用stencil buffer完成. 简要步骤如下: 绘制场景,设置DepthStencilState为stencil test永远通过,通过后stencil buffer中的值+1.这样…