summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/alphaF.glsl11
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/alphaV.glsl11
2 files changed, 19 insertions, 3 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);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index 3696234af6..60d414f2ff 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -41,7 +41,10 @@ void passTextureIndex();
ATTRIBUTE vec3 normal;
+#ifdef USE_VERTEX_COLOR
ATTRIBUTE vec4 diffuse_color;
+#endif
+
ATTRIBUTE vec2 texcoord0;
#ifdef HAS_SKIN
@@ -54,7 +57,11 @@ mat4 getSkinnedTransform();
VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
+
+#ifdef USE_VERTEX_COLOR
VARYING vec4 vertex_color;
+#endif
+
VARYING vec2 vary_texcoord0;
VARYING vec3 vary_norm;
@@ -112,8 +119,10 @@ void main()
vary_norm = norm;
vary_position = pos.xyz;
+#ifdef USE_VERTEX_COLOR
vertex_color = diffuse_color;
-
+#endif
+
#ifdef HAS_SKIN
vary_fragcoord.xyz = frag_pos.xyz + vec3(0,0,near_clip);
#else