Sign in to follow this  

Hardware Shadow Mapping

This topic is 4301 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

Hello, I made a similar post a little while back, but the questions here are a bit different. I'm trying to change the directX sdk shadow mapping demo so that it performs hardware shadowmapping. I am using a depthstencil texture now. 1. Is it so that I don't need to do anything in the pixel shader now? Just transform in the vertexshader like before and the rest will be handled by the hardware? 2. Do I need to change the way that texture is used? 3. Is there a way I can visualize the DST? Right now I don't even know if anything is rendered to that texture at all. I certainly get no shadows (nothing similar even), but I don't know in wich of these steps the problem is. Thanks.

Share this post


Link to post
Share on other sites
Hi,
to 1) You must call tex2Dproj in your pixel shader and hardware will compare current pixel depth and depthstencil texture depth for you returning whether pixel is shadowed or not.

2) If you are using depth stencil texture. You don't need to change the way.
Setting linear interpolation on DST will do nice fake PCF shadows.
Setting point interpolation on DST will do just normal shadows.

3) You can certainly get some visualisation from DST, if you readback DST and convert it someway into RGB format, which you then visualise. But it's some work to do and it will not help you much. Debugging your pixel shader is better from my opinion.

Also note, that hardware shadow mapping is running only on NVIDIA graphic cards.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I'm doing shadowmapping too. if you want to see if your depth is right just render color and draw a quad and you should see a blocky picture of the scene from the light's perspective if you did it right.

Share this post


Link to post
Share on other sites

This topic is 4301 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.

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