Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Re: Copying depth buffer to system memory

22 views
Skip to first unread message

lustu

unread,
Apr 29, 2012, 2:34:15 AM4/29/12
to
demmanuel wrote on 06/06/2004 16:01 ET :
> Hello
>
> I need to copy the current contents of the depth buffer int
> system memory
>
> I've looked over the documentation for LockRect and D3DFMT_D16_LOCKABL
> but so far I've been unable to get this to work
>
> Could someone post some example code or a link that shows how to do this
>
> Thank
>
There's one possibility : create a shader that reads the value of the Z buffer
an create an offscreen rendering putting a global shader that changes the color
of each pixel depending on its depth. Render this to a texture and you're OK
0 new messages