摘要: Sets whether or not this pass renders with depth-buffer writing on or not.Format: depth_write If depth-buffer writing is on, whenever a pixel is written to the frame buffer the depth buffer is updated with the depth value of that new pixel, thus affecting future rendering operations if future pixels 阅读全文
posted @ 2013-11-12 14:57 小 楼 一 夜 听 春 雨 阅读(492) 评论(0) 推荐(0)
摘要: 使用Z-偏移量 在一个三维场景中,我们可以对共面的多边形使用z-偏移量来使它们不再共面。这项技术通常用于在场景中正确的显示阴影。例如,一堵墙上的阴影与这堵墙的深度值是相同的,如果我们先渲染了墙再来渲染阴影,那么阴影就有可能看不到,或者会出现一些深度上的失真。这时,我们可以颠倒渲染的顺序希望能使得到的效果也产生相应的颠倒,但是深度上的失真仍然无法避免。 在渲染共面的多边形时,我们可以给z值增加一些偏移量,这样就能正确的显示共面的多边形了。要给多边形增加一个z-偏移量,我们可以在渲染前调用IDirect3DDevice3::SetRenderState方法,并将dwRenderStateTyp.. 阅读全文
posted @ 2013-11-12 14:49 小 楼 一 夜 听 春 雨 阅读(492) 评论(0) 推荐(0)