Multi-pass shading
Much like C/C++ code, GLSL does support the use of data arrays. Using them can seem like an obvious choice to just push information about multiple light streams into the shader and have it all done in one pass. Unlike C++, however, GLSL needs to know the sizes of these arrays at compile time, which is very much like C. At the time of writing, dynamic size arrays aren't supported. While this information can put a damper on a naive plan of handling multiple light sources with ease, there are still options to choose from, obviously.
One approach to combat this may be to have a very large, statically sized array of data. Only some of that data would be filled in and the shader would process it by looping over the array while using a uniform integer that tells it how many lights were actually passed to it. This idea comes with a few obvious bottlenecks. First, there would be a threshold for the maximum number of light streams allowed on the screen. The second issue is performance...