summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index 822b3e473d..6c70781bee 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -339,10 +339,12 @@ void main()
vec3 sun_contrib = min(da, scol) * sunlit;
#if PBR_USE_ATMOS
- color += sun_contrib;
+ color = linear_to_srgb(color);
+ color += 2.0*sun_contrib; // 2x = Undo legacy hack of calcAtmosphericVars() returning sunlight.rgb * 0.5;
color *= atten.r;
- color += 0.5*additive;
+ color += 2.0*additive;
color = scaleSoftClipFrag(color);
+ color = srgb_to_linear(color);
#endif // PBR_USE_ATMOS
#if DEBUG_PBR_DIFFUSE