Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualATEFred

Posted 19 April 2013 - 12:20 AM

In D3D9, you can't use (normal) depth buffers as textures (readable), only as surfaces (writable).

One workaround is to use MRT during your normal rendering, and manually write depth to a second render target. This however, requires editing all our shaders, and is inefficient.

Another workaround (that I'd recommend) is to create an "INTZ" texutre. This texture is a readable depth texture, and you can get its surface in order to use it as your depth/stencil target (instead of your regular depth buffer).
The only downside to this approach is that creating an INTZ texture will fail on any GPU older than a GeForce 8, so it raises your minimum requirements.

 

If I remember correctly from back then, you can use RawZ on older NV gpus. 


#1ATEFred

Posted 19 April 2013 - 12:19 AM

In D3D9, you can't use (normal) depth buffers as textures (readable), only as surfaces (writable).

One workaround is to use MRT during your normal rendering, and manually write depth to a second render target. This however, requires editing all our shaders, and is inefficient.

Another workaround (that I'd recommend) is to create an "INTZ" texutre. This texture is a readable depth texture, and you can get its surface in order to use it as your depth/stencil target (instead of your regular depth buffer).
The only downside to this approach is that creating an INTZ texture will fail on any GPU older than a GeForce 8, so it raises your minimum requirements.

 

If I remember correctly from back then, you can use RawZ on only NV gpus. 


PARTNERS