diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-04-10 10:31:51 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-04-10 10:31:51 -0700 |
commit | 9e9e0f3ea6dad9d0f553aaeb0819e660e248ad9f (patch) | |
tree | c40c3714881c795c61262ff41011d06d9c742480 /indra/newview/app_settings | |
parent | 72f6017dc245af1a72ce82c5d3a28904e08cd2a4 (diff) |
NORSPEC-98 side-step nV compiler fail-o-rama
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl index 10e9670894..07a7ee4e1a 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl @@ -55,6 +55,12 @@ uniform vec4 light_position[8]; uniform vec3 light_direction[8]; uniform vec3 light_attenuation[8]; uniform vec3 light_diffuse[8]; +#if 0 +uniform vec4 light_position[1]; +uniform vec3 light_direction[1]; +uniform vec3 light_attenuation[1]; +uniform vec3 light_diffuse[1]; +#endif float calcDirectionalLight(vec3 n, vec3 l) { @@ -124,11 +130,17 @@ void main() color.rgb = scaleSoftClip(color.rgb); vec3 light_col = vec3(0,0,0); - for (int i = 2; i < 8; i++) - { - light_col += light_diffuse[i].rgb * calcPointLightOrSpotLight(pos.xyz, vary_norm, light_position[i], light_direction[i], light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z); - } - +#define LIGHT_LOOP(i) \ + light_col += light_diffuse[i].rgb * calcPointLightOrSpotLight(pos.xyz, vary_norm, light_position[i], light_direction[i], light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z); + + LIGHT_LOOP(1) + LIGHT_LOOP(2) + LIGHT_LOOP(3) + LIGHT_LOOP(4) + LIGHT_LOOP(5) + LIGHT_LOOP(6) + LIGHT_LOOP(7) + color.rgb += diff.rgb * vary_pointlight_col * light_col; frag_color = color; |