summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/windlight
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/windlight')
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
index 768f422060..34ac0c62dc 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
@@ -137,12 +137,15 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
additive = (blue_horizon.rgb * blue_weight.rgb) * (cs + tmpAmbient.rgb) + (haze_horizon * haze_weight.rgb) * (cs * haze_glow + tmpAmbient.rgb);
// brightness of surface both sunlight and ambient
+
+ // fudge sunlit and amblit to get consistent lighting compared to legacy
+ // midday before PBR was a thing
sunlit = sunlight.rgb * 0.7;
amblit = tmpAmbient.rgb * 0.25;
+
additive *= vec3(1.0 - combined_haze);
}
-
vec3 srgb_to_linear(vec3 col);
// provide a touch of lighting in the opposite direction of the sun light
@@ -163,6 +166,8 @@ void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, ou
{
calcAtmosphericVars(inPositionEye, light_dir, 1.0, sunlit, amblit, additive, atten, false);
+ // multiply by 2 to get same colors as when the "scaleSoftClip" implementation was doubling color values
+ // (allows for mixing of light sources other than sunlight e.g. reflection probes)
sunlit *= 2.0;
amblit *= 2.0;