Jump to content
  • Advertisement
Sign in to follow this  
Funkymunky

DX12 D3D12: Number of depth stencil views?

This topic is 886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am creating a render setup that has 2 frames.  I've noticed, looking through the DirectX 12 Graphics Samples that, when using a similar setup, the samples create 2 RenderTargetViews but only 1 DepthStencilView.  Why is that?  Wouldn't you want the same number of DepthStencilViews as RenderTargetViews?

Share this post


Link to post
Share on other sites
Advertisement

Chances are that what you're seeing is one render target view per buffer in the double-buffered Swap Chain and a single depth stencil texture and view.

 

Two render target views are required because each one views a different resource in the swap chain. While one is being rendered to, the other is being "scanned out" and displayed on your monitor. Since the depth buffer is not part of the swap chain then there's no need for there to be two depth textures or two depth stencil views.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!