Jump to content
  • Advertisement
Sign in to follow this  
jdavis

Shadow mapping problem using a directional light source

This topic is 4220 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've been working on a shadow mapping shader for my RTS game for the past week and it's really starting to aggravate me now. Essentially what I'm doing is generating a single shadow map for multiple objects in the scene. I am taking the light's position and target and generating a view and projection matrix for the light then I do a calculation on the light's projection matrix using the far clip to get linearized depth. If I use the object's world matrix in the calculation (while generating the shadow map) I get no shadows period.. This is the result if I leave the object's world matrix out of the creation process of the shadowmap. That is the problem though, I guess since I can't use the object's world matrix, everything is in the center. They are all in the same spot in the shadow. Does anyone know why using the object's world matrix would result in no shadows? Also, pay no attention to the shadows not working on the terrain. I haven't gotten that far =) Any possible help would be appreciated. Thanks, Jonathon [Edited by - jdavis on January 28, 2007 4:10:26 AM]

Share this post


Link to post
Share on other sites
Advertisement
Beatiful.

Might be a good idea to give a short summary of how you solved your problem. Just in case somebody else finds this thread in search for a solution for a similar problem.

Bye, Thomas

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!