Jump to content
  • Advertisement
Sign in to follow this  
glmisscelan

projective texturing for shadows

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

Im been looking this shadow method, it seems interesting but i have some questions. I have several models and a bsp map, each model has its own shadow texture. All the examples that i have seen use models without textures an only one shadow caster. First How can i render all the shadow textures at once, using multiple texture stages? Second, how can i render a shadowtexture on already textured object, two passes with some kind of blending? THanks in advanced.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by glmisscelan
First How can i render all the shadow textures at once, using multiple texture stages?

Second, how can i render a shadowtexture on already textured object, two passes with some kind of blending?
Both issues are solved by simply uploading multiple texture matrices, one for each shadow cookie to be projected, and having your VS/PS happily mangle them. This means that if you're using TEXTURE_MATRIX you have to switch to another texcoord and upload another one (in a certain sense, we could say you have to use "TEXTURE_MATRIX0") and so go on for each stage.
Then the PS would just need to repeat the code with a few digits changed. If you're using FFP, it just takes to replicate texunit0' state to other ones... well, more or less.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!