summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2020-03-04 16:23:31 -0600
committerRunitai Linden <davep@lindenlab.com>2020-03-04 16:23:31 -0600
commit1481d78bb25a06ca99e0d75e8d6333abd6ce5590 (patch)
treedbda79109c553f862e1886ecaed984518d4c3a49 /indra/newview/app_settings/shaders
parentcc5044bce06598aab9f405bba745f0e8209fc5ce (diff)
Changes somehow missing from last commit
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl13
2 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
index dcc3750a8f..0d1cc81786 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
@@ -102,7 +102,8 @@ void main()
dist_atten *= dist_atten;
// Tweak falloff slightly to match pre-EEP attenuation
- dist_atten *= 2.2;
+ // NOTE: this magic number also shows up in a great many other places, search for dist_atten *= to audit
+ dist_atten *= 2.0;
dist_atten *= noise;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 593706867d..bacdb6f70f 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -127,7 +127,7 @@ vec3 post_ambient = color.rgb;
vec3 post_sunlight = color.rgb;
- color.rgb *= diffuse_srgb.rgb;
+ color.rgb *= diffuse_linear.rgb;
vec3 post_diffuse = color.rgb;
@@ -162,8 +162,10 @@ vec3 post_diffuse = color.rgb;
vec3 post_spec = color.rgb;
-#ifndef WATER_FOG
- color.rgb = mix(color.rgb, diffuse_srgb.rgb, diffuse_srgb.a);
+#ifdef WATER_FOG
+ color.rgb += diffuse_srgb.rgb * diffuse_srgb.a * 0.25;
+#else
+ color.rgb = mix(color.rgb, diffuse_linear.rgb, diffuse_linear.a);
#endif
if (envIntensity > 0.0)
@@ -206,9 +208,6 @@ vec3 post_atmo = color.rgb;
//color.rgb = post_env;
//color.rgb = post_atmo;
-// convert to linear as fullscreen lights need to sum in linear colorspace
-// and will be gamma (re)corrected downstream...
- color.rgb = srgb_to_linear(color.rgb);
}
// linear debuggables
@@ -217,6 +216,8 @@ vec3 post_atmo = color.rgb;
//color.rgb = vec3(scol);
//color.rgb = diffuse_linear.rgb;
+ //output linear RGB as lights are summed up in linear space and then gamma corrected prior to the
+ //post deferred passes
frag_color.rgb = color.rgb;
frag_color.a = bloom;
}