I have a vertex program which takes 8 lights, so there is a for loop to process these lights.
First question is what are the direction and attenuation parameters for absent lights when there are only 3 lights in the scene?
Secondly, what's the best way to loop through the active lights?
I was thinking to use for loop with the ACT_LIGHT_COUNT parameter, but i understood it's best to loop for constant range.
If i loop always to 8, then i need some IF statement to skip inactives, unless there is a trick to cancel out the inactives...
Code: Select all
uniform float4 uLightPosition[8],
uniform float4 uLightAttenuation[8],
uniform float4 uLightColor[8],