2013년 1월 16일 수요일

read only depth stencil view in deferred shading.

In deferred shading, We have to both reading and writing with depth buffer. And We can't set depth buffer as rendertarget and set shader resource simultaneously.
So we have to create additinal read only depth stencil view and set it as rendertarget when lighting pass. If not, reading depth buffer will fail.



D3D11_DEPTH_STENCIL_VIEW_DESC desc;
desc.Flags = D3D11_DSV_READ_ONLY_DEPTH;


I wandered for 3 hours about this.

댓글 없음:

댓글 쓰기