summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-05-06 16:29:06 -0700
committerGraham Linden <graham@lindenlab.com>2019-05-06 16:29:06 -0700
commitc61f73321dbef9f0f5741830bfbaa8facd6ec060 (patch)
tree9f07c674db061b81ca24a05470defb4a04fb5bec /indra/newview/app_settings
parentac080210a8cd2f64c040f980708ccce2c5464874 (diff)
SL-11102, SL-11103
Fix diffuse boost in deferred lighting to match non-deferred. Make class2 soften not clamp shadow color to incoming alpha (make shadows appear on terrain underwater).
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl7
4 files changed, 4 insertions, 9 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 2112fa8251..dbd7abd7e5 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -240,8 +240,6 @@ vec3 post_sunlight = color.rgb;
vec3 post_diffuse = color.rgb;
- //color.rgb = mix(diffuse_linear.rgb, color.rgb, final_alpha);
-
color.rgb = atmosFragLighting(color.rgb, additive, atten);
color.rgb = scaleSoftClipFrag(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index ba1f121bfd..7533762a96 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -367,8 +367,6 @@ vec3 post_diffuse = color.rgb;
vec3 post_spec = color.rgb;
- //color = mix(color.rgb, diffuse_srgb.rgb, diffuse_srgb.a);
-
if (envIntensity > 0.0)
{
//add environmentmap
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 981a50769a..fb9f6d7f37 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -153,8 +153,6 @@ vec3 post_diffuse = color.rgb;
vec3 post_spec = color.rgb;
- color.rgb += diffuse_srgb.a * diffuse_srgb.rgb;
-
if (envIntensity > 0.0)
{ //add environmentmap
vec3 env_vec = env_mat * refnormpersp;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index f6f8f56103..73b4473be5 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -95,7 +95,10 @@ void main()
vec4 diffuse_srgb = texture2DRect(diffuseRect, tc);
vec4 diffuse_linear = vec4(srgb_to_linear(diffuse_srgb.rgb), diffuse_srgb.a);
- scol = max(scol_ambocc.r, diffuse_linear.a);
+
+ // clamping to alpha value kills underwater shadows...
+ //scol = max(scol_ambocc.r, diffuse_linear.a);
+ scol = scol_ambocc.r;
vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
vec3 color = vec3(0);
@@ -160,8 +163,6 @@ vec3 post_diffuse = color.rgb;
vec3 post_spec = color.rgb;
- color.rgb += diffuse_srgb.a * diffuse_srgb.rgb;
-
if (envIntensity > 0.0)
{ //add environmentmap
vec3 env_vec = env_mat * refnormpersp;