summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2020-03-05 16:28:06 -0600
committerRunitai Linden <davep@lindenlab.com>2020-03-05 16:28:06 -0600
commit7c7d71269f5b47397d14bbe44e341e4ac1d96889 (patch)
treeea9ff1c27a6e067d225929b2f28d637db32d20bf /indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
parent90ad38db065877be16371e7814a39618135a30ab (diff)
WIP - Windlight sun lighting should happen in sRGB space, not linear space. This keeps ambient from getting overblown and better matches environment lighting with ALM on/off.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl11
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index da2eb47e3b..19e737326d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -119,7 +119,7 @@ vec3 post_ambient = color.rgb;
vec3 post_sunlight = color.rgb;
- color.rgb *= diffuse_linear.rgb;
+ color.rgb *= diffuse_srgb.rgb;
vec3 post_diffuse = color.rgb;
@@ -199,9 +199,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
@@ -209,7 +206,9 @@ vec3 post_atmo = color.rgb;
//color.rgb = vec3(ambient);
//color.rgb = vec3(scol);
//color.rgb = diffuse_linear.rgb;
-
- frag_color.rgb = color.rgb;
+
+ // convert to linear as fullscreen lights need to sum in linear colorspace
+ // and will be gamma (re)corrected downstream...
+ frag_color.rgb = srgb_to_linear(color.rgb);
frag_color.a = 0.0; //bloom;
}