Skip to main content
GameDev.net gamedev.net
🔒 Locked

projective texturing for shadows

Started by glmisscelan Mar 5, 2008 at 4:09 AM 0 replies 600+ views
Original Post
glmisscelan
glmisscelan
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.
Krohm
Krohm
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"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.