summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorGraham Madarasz (Graham) <graham@lindenlab.com>2013-04-22 09:56:08 -0700
committerGraham Madarasz (Graham) <graham@lindenlab.com>2013-04-22 09:56:08 -0700
commit38b222e76bc5fc4dd3f05787a45f38087b4af5cc (patch)
tree0092a180c8c4a1cf844677611ec747e4cdd79b6b /indra/newview/app_settings/shaders
parentf42f01d4c298c19e476a7f2ecad926aebedfe170 (diff)
Fix regression in alpha shader on non-Mac from recent changes
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl7
3 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index a3be4bb0c3..ec04f856fb 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -106,11 +106,13 @@ void main()
#ifdef USE_INDEXED_TEX
vec4 diff = diffuseLookup(vary_texcoord0.xy);
-#else
+#endif
+
+#ifdef USE_DIFFUSE_TEX
vec4 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));
#ifdef USE_VERTEX_COLOR
float vertex_color_alpha = vertex_color.a;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index 93f9e05aec..91f7b007f3 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -49,9 +49,11 @@ ATTRIBUTE vec2 texcoord0;
#ifdef HAS_SKIN
mat4 getObjectSkinnedTransform();
-#elif IS_AVATAR_SKIN
+#else
+ifdef IS_AVATAR_SKIN
mat4 getSkinnedTransform();
#endif
+#endif
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -211,3 +213,4 @@ void main()
#endif
}
+
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index a231091e12..aedb9ea510 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -224,11 +224,13 @@ void main()
color.rgb = atmosLighting(color.rgb);
color.rgb = scaleSoftClip(color.rgb);
+
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);
-
+
+
LIGHT_LOOP(1)
LIGHT_LOOP(2)
LIGHT_LOOP(3)
@@ -238,7 +240,8 @@ void main()
LIGHT_LOOP(7)
color.rgb += diff.rgb * vary_pointlight_col * col.rgb;
-
+
frag_color = color;
+
}