Skip to main content
GameDev.net gamedev.net
🔒 Locked

Multiple DepthStencilViews, One Per RenderTargetView?

Started by PKLoki Jul 31, 2015 at 7:59 AM 1 replies 2k views
Original Post
PKLoki
PKLoki

Hi,

DirectX allows me to bind an array of render target views, or a render target view created from an array resource, and select which to write to using the SV_RenderTargetArrayIndex semantic output from a geometry shader. All good. But as far as I can see (from MSDN) there's a limitation in that all bound render targets have to share the same depth buffer.

The thing I'm working on would require each target to have its own associated depth buffer, essentially writing each triangle to eight different targets, each with different transforms but otherwise identical render states etc.

Binding a depth stencil view created from a texture2darray resource doesn't seem to work. There's no obvious failure on creating the resource, but nothing gets rendered when I try to use such a resource. I guess my semantic pedantic argument that this is should count as a single view doesn't hold weight :-)

I've already thought of a slightly hacky workaround, but does anyone know of a way to do what I'm trying without jumping through too many hoops?

Thanks

--

L. Spiro
L. Spiro
A single depth-stencil resource can be bound at a time.
If you need more you must make more render passes.


L. Spiro
I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Topic Locked

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

Sign in to reply to this topic.