summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2013-04-19 14:26:49 -0700
committerGraham Madarasz <graham@lindenlab.com>2013-04-19 14:26:49 -0700
commite10cac8847b78f1bf6bb50527d347690c48896c9 (patch)
treea264048506774a0669d6ac7468e85775e2fd12e2 /indra/newview/app_settings/shaders
parent4cd213b0059880e6bcee2634984322d18a20fb57 (diff)
Avoid mac shader compiler crash on someFuncTakingFloats(INTEGER_CONSTANT) malarkey
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl2
2 files changed, 4 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 21179663a7..49aa28eedf 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -206,8 +206,7 @@ void main()
#ifdef USE_DIFFUSE_TEX
diff = texture2D(diffuseMap,vary_texcoord0.xy);
#endif
-
- diff.rgb = pow(diff.rgb, vec3(2.2));
+ diff.rgb = pow(diff.rgb, vec3(2.2f, 2.2f, 2.2f));
float vertex_color_alpha = 1.0;
@@ -216,7 +215,6 @@ void main()
#endif
vec3 normal = vary_norm;
-
vec3 l = light_position[0].xyz;
vec3 dlight = calcDirectionalLight(normal, l);
dlight = dlight * vary_directional.rgb * vary_pointlight_col;
@@ -225,12 +223,11 @@ void main()
vec4 color = diff * col;
color.rgb = atmosLighting(color.rgb);
-
color.rgb = scaleSoftClip(color.rgb);
- col = vec4(0,0,0,0);
+ col = vec4(0.0f,0.0f,0.0f,0.0f);
#define LIGHT_LOOP(i) \
- col.rgb += light_diffuse[i].rgb * calcPointLightOrSpotLight(pos.xyz, normal, light_position[i], light_direction[i].xyz, light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z);
+ col.rgb += light_diffuse[i].rgb * calcPointLightOrSpotLight(pos.xyz, normal, light_position[i], light_direction[i].xyz, light_attenuation[i].x, light_attenuation[i].y, light_attenuation[i].z);
LIGHT_LOOP(1)
LIGHT_LOOP(2)
@@ -241,6 +238,5 @@ void main()
LIGHT_LOOP(7)
color.rgb += diff.rgb * vary_pointlight_col * col.rgb;
-
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
index e9208a291d..2db795adfb 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
@@ -190,7 +190,7 @@ void main()
// Add windlight lights
col.rgb = atmosAmbient(col.rgb);
- vary_directional.rgb = atmosAffectDirectionalLight(1);
+ vary_directional.rgb = atmosAffectDirectionalLight(1.0f);
vary_ambient = col.rgb*dff;
col.rgb = col.rgb*dff;