Reading the depth buffer for a given x, y?
Is there a way in DirectX 8.1 to read the value in the depth buffer for given x, y pixel co-ordinates?
I know in OpenGL, there is a function ''Unproject()'' or similar, which would achieve the desired results, but I need this for DirectX 8.1.
Thanks & HNY,
Richard Hayden.
Well.. I don''t really use DX8, only DX7, but I guess you can lock the Z-buffer and get a pointer to it. Once you got that, you just have to read the appropriate value directly from memory. However, be aware that reading FROM video memory is VERY SLOW. If you just read 2-3 pixels per frame it''s ok but don''t hope to read big chunks.
Note : and please do not double post. Thanks.
Note : and please do not double post. Thanks.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement