There should be at least 64 uniform floats available
and according to this statistics there are at least
two ATI Mobility cards with only 64 uniform floats.
Now my question:
The code above would exceed this limit of 64 floats.
I do not really care about these cards but a general
question raised up for me. If I want a lot of lights
(maybe even more than 8), how to bypass this limitation?
Anyone knows a good tutorial with some sample code
that targets this limitation?
I ran into the same problem a few months back, although I hit the limit on varying parameters… Shadowmapping space limitations brought the forward approach to its knees.
In short, the (a) way to go is deferred rendering: deferred stalker
I have only good things to say about how the deferred approach simplified my shader setup. I guess it has some achilles heels (transparency, for instace), but…
Yeah, also consider whether you need MSAA. Research carefully before you just decide to go Deferred Shading. Like everything, has it’s pros and cons.
Also consider whether Deferred Lighting (Light Pre-Pass) is what you’d rather have, or whether it might be more efficient for you.
Also consider whether you’ll really have 8 simultaneous lights, or whether that’s an extreme example you’ll almost never see, and can work around if you ever do.