set the depth buffer's clear value
Posted: Mon Oct 05, 2009 10:18 pm
Hi,
I'm trying to do some sanity testing while writing shaders. It would be great if I could specify the clear value of the depth buffer so I can check it in my shader. In OpenGL, this is done with 'glClearDepth' as far as I can tell, not sure about D3D. It seems like the right place would be in the Viewport class. Maybe the interface would look like this?
Thanks 
I'm trying to do some sanity testing while writing shaders. It would be great if I could specify the clear value of the depth buffer so I can check it in my shader. In OpenGL, this is done with 'glClearDepth' as far as I can tell, not sure about D3D. It seems like the right place would be in the Viewport class. Maybe the interface would look like this?
Code: Select all
@param value the value to initialize all pixels in the depth buffer with
void Viewport::setDepthClear(double value);