Jump to content
  • Advertisement
Sign in to follow this  
BaSSraf

Projecting a texture layer as shadow ?

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

Hey guys, I sort of know how to create shadows from triangulated objects etc.. But I have some textures quads with multiple textures per quad and one of these texture layers is the shadow. Currently the shadow is nothing more than a texture with a positional offset. Is there a "standard" method for projecting this texture layer on the scene so I get a "real" shadow which takes the lighting position into account and possibly even the type of light? (spots) Am I looking at a projective texture? (and how to project it regarding the light(s) ?). I'm using directx, any ideas, links even :) ?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by BaSSraf
Am I looking at a projective texture? (and how to project it regarding the light(s) ?).
Yup, sounds like it. What you're looking to do is to set up your texture coordinates such that they're the vertex's world-space position projected into the light's view frustum (i.e. you build a view + projection matrix from the light's point of view).

Share this post


Link to post
Share on other sites
Thx SP, I think i'll manage that, any way to have it "wrap" around objects behind it?

Techniques to use?

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!