HI,
I'm doing a final pass on my water rendering, as such, I would like to be able to reference a copy of the depth buffer to understand how deep the water is at a point based upon the water pixels Z and the Depth of the Z value. Im doing some water depth related effects, therefore sampling the Z Depth.
I have a few ideas on how to solve this. The simplest I believe is not possible, so it leaves me with a couple of options.
1 - ResolveSubresource from a MSAS Depth buffer to a non MSAA Depth buffer (believe this is not possible as resolving from a depth buffer with depth stencil flag set).
2 - I just copy the depth resource as a MSAA Depth buffer to a MSAA Depth buffer. Then Use Load to sample in the shader for the depth. Slower, but should work.
3 - Render the MSAA Depth buffer using a full screen quad to another target which is a non MSAA SRV.
4 - Consider this is a transparency pass, I probably could use the depth buffer unbound from rendertarget and use as a SRV and use Load to sample from it (no need to copy at all).
2 or 4 seem to be the go. I believe 4 would be best of all the options. and should be the fastest option.
Comments. Am I missing something here?
Cheers