You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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