summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-07-02 11:20:09 -0700
committerGraham Linden <graham@lindenlab.com>2019-07-02 11:20:09 -0700
commit7e5000bb64ca8eea3fe188ebb7bccff3bdfa82e7 (patch)
tree7350df57d466b4b9fc4ad2fe10e8d590207c1841 /indra/newview/app_settings/shaders/class1/deferred
parent576f1cdd7e16e44c43b39618f715753160045468 (diff)
SL-11533
Make alpha shader include vertex color modulation in both srgb and linear flavors.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl12
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl10
2 files changed, 2 insertions, 20 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 20dc03d7a5..15408b3475 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -53,9 +53,7 @@ VARYING vec3 vary_position;
VARYING vec2 vary_texcoord0;
VARYING vec3 vary_norm;
-#ifdef USE_VERTEX_COLOR
VARYING vec4 vertex_color;
-#endif
uniform mat4 proj_mat;
uniform mat4 inv_proj;
@@ -191,12 +189,9 @@ void main()
color.rgb = diffuse_srgb.rgb;
color.a = 1.0;
-#ifdef USE_VERTEX_COLOR
float final_alpha = diffuse_srgb.a * vertex_color.a;
diffuse_srgb.rgb *= vertex_color.rgb;
-#else
- float final_alpha = diffuse_srgb.a;
-#endif
+ diffuse_linear.rgb *= vertex_color.rgb;
// Insure we don't pollute depth with invis pixels in impostor rendering
//
@@ -206,12 +201,9 @@ void main()
}
#else
-#ifdef USE_VERTEX_COLOR
float final_alpha = diffuse_linear.a * vertex_color.a;
+ diffuse_srgb.rgb *= vertex_color.rgb;
diffuse_linear.rgb *= vertex_color.rgb;
-#else
- float final_alpha = diffuse_linear.a;
-#endif
vec3 sunlit;
vec3 amblit;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index 506118d381..619c4e9738 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -40,11 +40,7 @@ void passTextureIndex();
#endif
ATTRIBUTE vec3 normal;
-
-#ifdef USE_VERTEX_COLOR
ATTRIBUTE vec4 diffuse_color;
-#endif
-
ATTRIBUTE vec2 texcoord0;
#ifdef HAS_SKIN
@@ -57,11 +53,7 @@ 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;
@@ -118,9 +110,7 @@ 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);