Is it possible to read the depth buffer in DX 9? If so, which interface and method should I use? And how is the data stored in the buffer?
Regards!
-Marco
Is it possible to read the depth buffer in DX 9? If so, which interface and method should I use? And how is the data stored in the buffer?
Regards!
-Marco
Look at IDirect3DDevice9::GetDepthStencilSurface. It allows you to get the depth/stencil surface as a IDirect3DSurface9 object. Then use the GetDesc method of the surface to retrieve the format of the data.
Thanks!
Forget about it.
In theory you can try to create D16_LOCKABLE depth buffer, but reading from it will be hardly effectively (from speed point).
There are only 10 types of people in this world; those who understand binary and those who don't.
Bookmarks