Now, with reference to the previous model of a single light source I'm going to cover this next diagram:
(Click To Enlarge)
Any decent 3D scene will have more than one light, and it's via the above mechanism that I intend to achieve this.
Each of the "Render Light..." processes is an instance of the previous diagram. Given that I suggested a single light could take upto 15mb of VRAM this could yield around 240mb of VRAM data for all lights to be enabled [lol]
When scaled up in this way, resources can definitely be shared. There needs to be 16 render targets to handle the results of each light source; but there need only be 1 (instead of 16) copies of the intermediary resources. This makes things a lot more resource friendly.
So, for a 1024 * 768 display with 24bit Depth Buffer and a 64bit HDRI output we now have 112mb of rendering data instead of 240mb. Still a little high though!
For those of you who are familiar with this stuff, a couple of hardware considerations have been made:
1. I'm using HDRI, and most ATI hardware doesn't allow "native" additive blending; thus I've included it as a seperate process. Where appropriate this can be implemented using native features.
2. With respect to the ATI hardware and general SM2 stuff, I can only (in a single pass) combine 16 textures. Therefore 16 lights. I could do a multi-pass combination, but I'm pretty sure 16 lights should be sufficient for 99.9% of uses.