summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-03 09:12:53 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-03 09:12:53 -0700
commit9c23ede9799a3277ae8e79f9832b3ea557fc069d (patch)
tree683300bc40f4a606cbc454886c3975889a716b51 /indra/newview/app_settings/shaders/class1
parent906b0be675e5467665f65180924e6117700b4cbb (diff)
SL-11075
Make alpha shader apply vert color everywhere.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl1
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/moonF.glsl3
3 files changed, 5 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 0a189ff416..b00e2290a9 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -194,6 +194,7 @@ void main()
#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
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
index c5eaacbd0b..595efdf6fe 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
@@ -120,11 +120,11 @@ void main()
vec4 color;
color = (cloudColorSun*(1.-alpha2) + cloudColorAmbient);
color.rgb= max(vec3(0), color.rgb);
- color.rgb = linear_to_srgb(color.rgb);
+ //color.rgb = linear_to_srgb(color.rgb);
//alpha1 = 1.0;
//color.rgb = cloudColorAmbient.rgb;
-
+color.rgb = vec3(1,0,1);
/// Gamma correct for WL (soft clip effect).
frag_data[0] = vec4(scaleSoftClip(color.rgb), alpha1);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
index 8256d5f106..80f232948a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/moonF.glsl
@@ -57,7 +57,8 @@ void main()
// and shows true moon color at night
vec3 luma_weights = vec3(0.3, 0.5, 0.3);
- float mix = 1.0 - dot(normalize(sunlight_color.rgb), luma_weights);
+ vec4 light_color = max(sunlight_color, moonlight_color);
+ float mix = 1.0 - dot(normalize(light_color.rgb), luma_weights);
vec3 exp = vec3(1.0 - mix * moon_brightness) * 2.0 - 1.0;
c.rgb = pow(c.rgb, exp);