summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl
diff options
context:
space:
mode:
authorGraham Madarasz (Graham Linden) <graham@lindenlab.com>2013-04-11 11:57:50 -0700
committerGraham Madarasz (Graham Linden) <graham@lindenlab.com>2013-04-11 11:57:50 -0700
commit19430bfce05748c363bb83c7e78e605ee6af3b14 (patch)
tree8e231bb114b251658e12d62c89f114936f05e876 /indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl
parent35400fb415d296ab0fde9e2775a98f15041985e0 (diff)
NORSPEC-98 fix? for mac shader compiler crasher
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl11
1 files changed, 4 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl
index 07a7ee4e1a..eff7b91a88 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaNonIndexedF.glsl
@@ -55,12 +55,6 @@ 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)
{
@@ -120,7 +114,10 @@ void main()
vec4 diff= texture2D(diffuseMap,vary_texcoord0.xy);
- vec3 dlight = calcDirectionalLight(vary_norm, light_position[0].xyz) * vary_directional.rgb * vary_pointlight_col;
+ vec3 n = vary_norm;
+ vec3 l = light_position[0].xyz;
+ vec3 dlight = calcDirectionalLight(n, l);
+ dlight = dlight * vary_directional.rgb * vary_pointlight_col;
vec4 col = vec4(vary_ambient + dlight, vertex_color.a);
vec4 color = diff * col;