diff options
author | Dave Parks <davep@lindenlab.com> | 2023-03-28 14:30:59 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2023-03-28 14:30:59 -0500 |
commit | 10f66c05190585e9de2e85831712323c297d81c4 (patch) | |
tree | 7ca97a8f67aea3714a88e4e5016be12a0d1f62e5 /indra/newview/app_settings/shaders/class2 | |
parent | 9bf08f553aa59122a606487f1b28bd6083d9f966 (diff) |
DRTVWR-559 Dynamically adjust exposure.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl index 55e1411be2..f9a1f5e4d6 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl @@ -62,7 +62,9 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou vec3 rel_pos_norm = normalize(rel_pos); float rel_pos_len = length(rel_pos); - vec3 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color; + float scale = sun_up_factor + 1.0; + vec3 sunlight = (sun_up_factor == 1) ? sunlight_color: moonlight_color; + sunlight *= scale; // sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes @@ -140,7 +142,7 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou // fudge sunlit and amblit to get consistent lighting compared to legacy // midday before PBR was a thing - sunlit = sunlight.rgb * 0.7; + sunlit = sunlight.rgb / scale; amblit = tmpAmbient.rgb * 0.25; additive *= vec3(1.0 - combined_haze); |