(Click To Enlarge)
The above is my current (high level) thinking on rendering a scene with a single light source that is potentially shadowed using shadow maps.
For what I want to do, I think I can safely restrict shadowed lights to being either point lights (cube maps for shadows) or directional lights (planar shadow maps) - I could add spot lights in later on, but I can't envisage them being particularly useful.
Although it's annoying that I have to target D3D9 with this - it'd be pretty awesome to do point-light shadow mapping with a single pass - as we'll be doing with D3D10 [grin]
One thing I think I'll look into adding to that flow-diagram is softening of the shadow maps. From what I've seen, even the trivial/incorrect softening techniques make it look so much better.
Currently the space complexity for a single light goes something like this:
So, for a 1024 * 768 display with a 24bit depth buffer, running 64bit HDRI and a 512 * 512 Shadow Cube Map we'd only need 15mb of VRAM. Per Light [oh].
The reasoning behind modelling a single light source might well become more obvious when I post the next diagram [wink]