summaryrefslogtreecommitdiff
path: root/indra
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
parent906b0be675e5467665f65180924e6117700b4cbb (diff)
SL-11075
Make alpha shader apply vert color everywhere.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml2
-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
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl2
5 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index fd4c2917d5..062c3f4cae 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8818,7 +8818,7 @@
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>1</integer>
</map>
<key>RenderLocalLights</key>
<map>
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);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index a2fbec524e..8fcd26eba9 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -153,7 +153,7 @@ vec3 post_diffuse = color.rgb;
float scontrib = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
vec3 speccol = sun_contrib*scontrib*spec.rgb;
speccol = clamp(speccol, vec3(0), vec3(1));
- bloom += dot (speccol, speccol) / 6;
+ bloom += dot (speccol, speccol) / 12;
color += speccol;
}
}