Skip to main content
gamedev.net
🔒 Locked

Stencil buffer

Started by kapru Jan 31, 2004 at 5:17 AM 2 replies 300+ views
Original Post
kapru
kapru
I want to be able to get values out of the depth buffer so i can speed up my terrain tile picker by using D3DXVec3Unproject. I need the depth of the pixel that the mouse is over so i can parse unproject the distance from the screen. So can a stencil buffer be used for this and if so how can i do it
noVum
noVum
No. And you should NOT read from VRAM ever (at least not till PCI Express arrives afaik)
Doing so will be very slow. Line/Highmap intersection in software is not that difficult
kapru
kapru
Ok then is there any way to use D3DXVec3Unproject to do what i want
noVum
noVum
Yes. Reading from the Z-buffer. But as I told you, I strongly disadvise you from doing so.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.