Sign in to follow this  
ChrisB_FX

[DX9] DepthStencilbuffer

Recommended Posts

Hi, in my application i have many different rendertarget with different sizes, formats and multisampling setting. So i was wondering what is better/faster: 1. one depthstencil buffer in the size of the biggest rendertarget which is used for all rendertargets if possible or 2. each rendertarget has its own depthstencil buffer. Does the size of the depth buffer actually influence the render speed? Is there a limit for the amounts of depthstencil buffers (beside the total vram limit)? thx ChrisB

Share this post


Link to post
Share on other sites
I would imagine storage space is likely to be your problem. Swapping the render targets around is generally an expensive operation anyway, so you'd probably get a more notable speed-up by changing the algorithm and minimizing the number of target changes rather than the actual operation itself.

The thing to watch out for when using a single larger buffer is contamination. You could get some very weird bugs that are very hard to track down if you rendered one frame (worse yet, some part of a reflection used in some small part of the final frame) with 'dirty' depth data from a previous render. So long as you check you've cleared the targets and configured correctly you should be fine though!


hth
Jack

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this