Jump to content
Posted 08 September 2012 - 12:50 AM
Posted 08 September 2012 - 08:59 AM
Posted 08 September 2012 - 12:13 PM
thx, but this must prepare render data and change state( shader, primitive stream, DepthStencil State), I want to avoid this.
Render a quad with always-pass depth-testing and depth 1.0, or whichever value you wish to clear it to.
Posted 08 September 2012 - 02:09 PM
Edited by Erik Rufelt, 08 September 2012 - 02:12 PM.
Posted 09 September 2012 - 12:50 AM
Ok, I'll try it,thank you.
Keep a second buffer around that has the static contents of the particular depth value you wish to clear to, and use CopySubresourceRegion. http://msdn.microsof...4(v=vs.85).aspx
Actually never mind, the docs say you can't do that for a depth stencil resource. Unless you clear very many times per frame state-changes won't be a problem for drawing a quad.