🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Understanding Z-prepass in DirectX 11

Started by
11 comments, last by Key_C0de 2 years, 8 months ago

@Juliean Thank you for the prompt clarification.

So if I just bind that DepthStencilView as Input (using ShaderResourceView) for later stages, the later passes will read all depth information from that one, correct?

None

Advertisement

Key_C0de said:
So if I just bind that DepthStencilView as Input (using ShaderResourceView) for later stages, the later passes will read all depth information from that one, correct?

Yes, as long as you don't clear the depth-buffer in between ? There is virtually no difference between a depth-buffer and a render-target texture this way.

Juliean said:

Key_C0de said:
So if I just bind that DepthStencilView as Input (using ShaderResourceView) for later stages, the later passes will read all depth information from that one, correct?

Yes, as long as you don't clear the depth-buffer in between ? There is virtually no difference between a depth-buffer and a render-target texture this way.

Well that's exactly what it is. It's a render to texture (aka offscreen buffer), specifically rendering the depth buffer to a texture like you would do with shadow maps.

There are only 2 types of renders (render to back buffer & render to texture).

None

This topic is closed to new replies.

Advertisement