So I have a program that draws to screen space. I would like to set up a depth buffer and draw and manage it myself. However, I am very unfamiliar with depth buffers and I'm not really sure how you can simply draw and manage it yourself.
Essentially, what I want to do, is take any call to drawprimitiveup on the back buffer, and make a similar call to the depth buffer, but have it simply say that the shape is as close as possible to the view. I also do not want it to clear the depth buffer, but rather degregate the vertexes in the depth buffer so that they are slightly further away.
Note: I plan to later use this depth buffer to create a left and right view of the image. I would rather do it in this manner than simply rendering the scene twice, because this method is more desirable for my project.
Any advice on how to bring this concept to practice would be appreciated, as well as references for depth buffer usage, besides just the pipeline doc, or just useful tidbits that I might be able to put together (for example, I am wondering if a depth buffer can be considered a surface in the same way as any other buffer). I'm very new to DirectX so you're advice is appreciated!
Edit: Some other questions I have:
Is it possible to look at the backbuffer and "move" each pixel based on it's depth value? If so, what are the calls for that?
Edited by Catwheel, 14 August 2014 - 09:21 PM.