summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2013-07-25 12:13:21 -0700
committerGraham Linden <graham@lindenlab.com>2013-07-25 12:13:21 -0700
commit3045dd6c5113d03fd0b0453ce916fc2a1c27c4e0 (patch)
tree61f327cc4b93a1b4a56eaac210a87068d42859e0 /indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
parent6d21cd2ae1e8a32ccaf750a97199407fb1cacdef (diff)
Make use of vertex_color selectable per shader with alphaF/alphaV again
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/alphaF.glsl11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 075699c591..52858f45f4 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -77,7 +77,10 @@ VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
VARYING vec2 vary_texcoord0;
VARYING vec3 vary_norm;
+
+#ifdef USE_VERTEX_COLOR
VARYING vec4 vertex_color;
+#endif
vec3 vary_PositionEye;
vec3 vary_SunlitColor;
@@ -476,13 +479,17 @@ void main()
#else
vec4 diff = texture2D(diffuseMap,vary_texcoord0.xy);
#endif
+
+#ifdef USE_VERTEX_COLOR
+ float final_alpha = diff.a * vertex_color.a;
diff.rgb *= vertex_color.rgb;
+#else
+ float final_alpha = diff.a;
+#endif
vec4 gamma_diff = diff;
diff.rgb = srgb_to_linear(diff.rgb);
- float final_alpha = diff.a * vertex_color.a;
-
vec3 norm = vary_norm;
calcAtmospherics(pos.xyz, 1.0);