🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

projective texturing for shadows

Started by
0 comments, last by Krohm 16 years, 4 months ago
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.
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.

Previously "Krohm"

This topic is closed to new replies.

Advertisement