Original Post
Hi all, I'm trying to do some post processing effect in D3D without using programmable shaders. I'm almost finished, and now I need to read depth buffer data. I'm trying with it for a while now and I'm out of ideas. I can make a d3d device with the D3DFMT_D16_LOCKABLE depth buffer surface, and I can get a lock on it (or at least the LockRect function succeed). I cast the buffer pointers pData member to unsigned short pointer. And I take exactly the same values for all the pixels in the buffer. If I copy the bits to the backbuffer, then I've got a plain green surface. Can anyone show me some WORKING code for reading from the depth buffer? And it is important, that I don't use any programmable shaders. Thx all.