diff options
author | Runitai Linden <davep@lindenlab.com> | 2020-03-05 16:28:06 -0600 |
---|---|---|
committer | Runitai Linden <davep@lindenlab.com> | 2020-03-05 16:28:06 -0600 |
commit | 7c7d71269f5b47397d14bbe44e341e4ac1d96889 (patch) | |
tree | ea9ff1c27a6e067d225929b2f28d637db32d20bf /indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl | |
parent | 90ad38db065877be16371e7814a39618135a30ab (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/class2/deferred/softenLightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index bacdb6f70f..58d573c724 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -106,7 +106,7 @@ void main() vec3 atten; calcAtmosphericVars(pos.xyz, light_dir, ambocc, sunlit, amblit, additive, atten, true); - + float ambient = da; ambient *= 0.5; ambient *= ambient; @@ -127,7 +127,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; @@ -218,6 +218,6 @@ vec3 post_atmo = color.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.rgb = srgb_to_linear(color.rgb); frag_color.a = bloom; } |