   Shader: Multipass texturing and shadowmaps
  After I have made multipass texturing (more precisely, it is for terrain "splatting"), I have no idea what the pixel color at a certain location is - I only know what it is at the last pass. This is due to the alpha-component, that lets earlier passes "shine through".Is there any way that I can know what the "total" color is at a certain location?I need to know this, so I can mix the shadow with the right (total) color.I thought of maybe rendering the entire scene to a texture first, to store the colors there, but that seems a bit cumbersome...Is this how it is normally done, or is there an easier solution?[Edited by - Mercenarey on December 4, 2005 9:48:07 PM]
  I just thought of one thing:I could just put an alpha value on the shadowmap itself. Gonna experiment with that, hehe.It would be nice, however, to hear of other possibilities.   ;  I actually just implemented something along these same lines for a shadow map shader.  I create an 'illumination' buffer that shows how illuminated each pixel in the current scene is.  This is used to combine all light input into a single buffer, including the effects of shadows.Once all lights have been combined, then I use that buffer to modulate the normally shaded scene.  I still have some work to do, but it seems to be working out fairly well.So in your scenario, you would splat as normal, but each splat would be modulated by the illumination buffer.   