Shadow maps and multitexturing


I have multiple shadowmaps (more than one light, and more than one shadowmap per light), but I don’t understand how I can use all of them when rendering the scene. Is the number of textures limited by the amount of ActiveTextures, or can I reuse them in some way? Or is there another way to do this?


If you have for example 4 texturing units (like GeForce3 & GeForce4 have), you could use 4 shadow maps at one time. So you have to render scene in few passes.

Let’s say you have 4 shadow maps per 1 light, so I propose to render them all in a single pass. Then take another light, and render it’s shadows in second pass…

sure you can reuse them , we do that all the time …but it will be multiple passas
just do the old glActiveTexture (in same texture unit) for a different texture ,then bind and activate it

Do you really need that much shadow maps ? what about the bump maps , specular maps and all ?

Thanks for your tips!
I’ve finally figured out how to solve my problem (I’m limited to use one texture unit (for shadow) each pass - so I will try many passes. Hope it doesn’t get too slow.)

  • Monica