   shadows in lightmap space
  Hi there,I've been working on a process of rendering my lighting and shadows into lightmap space, as a precursor to implementing texture based Ambient Occlusion.I seem to have a few bottlenecks at the moment, and i'm wondering if anyone else has managed to implement anything similar.Currently my renderer performs the following...1. Render each lights depthmap into a FBO, along with a color buffer containing the linear distance of each occluder from the light (for computing soft shadow penumbra - not working properly yet - There's probably a better way to do this).2. Accumulate each light in lightmap space to another texture.3. Apply the texture generated in (2) to the scene, along with an AO map (rendered using skylight, radiosity, and render to texture in Studio Max).Currently this is giving me 300-700 fps on a 6600 gt for 4 lights.  I only update the lights if their position or view changes slightly; but when this happens, I have to re-render all of the lights that affect the lightmap, and this reduces the framerate significantly.   
  Cmon...Hasn't anyone out there implemented lighting in lightmap space.It's similar to a couple of the demo's on the http://frustum.org/3d/website - subsurface scattering, and lightmaps onthe same page.;  The only thing you would need to make sure is that every vertex in your mesh has unique uv coordinates.  Otherwise there will be overlap in the lightmap.   