Original Post
I am trying to code a lighting system that uses spotlights that project spotlight-shaped textures as lightmaps onto objects and where each spotlight also projects a shadow map onto the scene. However, I am having a few problems gettign this to work: 1) Shadow mapping only works correctly if exactly one light binds and enables its shadowmap. Otherwise, all objects appear to be in shadow. (I am using the shadow mapping code from www.paulsprojects.com with a few modifications) 2) If two or more lights project their lightmaps, then light only appears on objects where the lightmaps overlap. Please, if you have any ideas on how to correct either one of these problems, I could use the help! EDIT: I uploaded some images of the lightmap problem. Clicky #1 When using one lightmap, everything works just fine. Clicky #2 When using two lightmaps, they only appear light up the region where they overlap on. NOTE: The seconds lightbulb is offscreen at the bottom right hand corner. Only the first light attempts to cast shadows btw. [Edited by - Foxostro on November 14, 2004 9:50:48 AM]