Drawing depth buffer in pixel shader

Started by
10 comments, last by ajithk 8 years, 3 months ago

Check the D3D debug layer output and/or with a graphics debugger if your resources are actually bound correctly. Other bugs aside it's usually a read/write hazard: One has to explicitly unbind resources before binding it elsewhere otherwise the API will nullify such an attempt (but report it in the debug layer).

PS: The debug layer is enabled with D3D11_CREATE_DEVICE_DEBUG at device creation.

Advertisement
Hey! I got it working. Direct3D 11.0 will allow simultaneous read/write in either pixel or compute shader with only DXGI_FORMAT_R32_UINT. (Also, see the comment at the bottom of the page in the link). I din't knew this stuff.

https://msdn.microsoft.com/en-us/library/ff728749(v=vs.85).aspx

This topic is closed to new replies.

Advertisement