Jump to content
  • Advertisement
Sign in to follow this  
Zipster

Shadow mapping in DX10

This topic is 3980 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 just had a few quick questions regarding the proper way to handle shadow mapping in DX10. In our DX9 engine, we had special cases for both nVidia and ATI where we created a texture with a depth stencil format, used that as the depth stencil buffer when rendering the scene (pixel shader just outputted black), and then fed it into the shadow mapping shader. What's the equivalent in DX10? Whenever we tried using the DXGI_FORMAT_D24_UNORM_S8_UINT format to create a texture, it would spit an error when we then tried to create a shader resource view from it. On the other hand, when we created a texture with the DXGI_FORMAT_R32_FLOAT format, it wouldn't allow us to create a depth stencil view from it. So if we can't create a shader resource view with a depth stencil format, and we can't create a depth stencil view from a regular texture format, how do we do shadow mapping? Do we need to fall back on the old-school technique of rendering depth manually in a shader?

Share this post


Link to post
Share on other sites
Advertisement
Create the texture with the corresponding TYPELESS DXGI format, then create the render target and shader resource views with the appropriate typed formats.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!