summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-03-30 18:41:34 -0500
committerDave Parks <davep@lindenlab.com>2023-03-30 18:41:34 -0500
commitc0958922c3b3015fd7f17781a79032050b2ed387 (patch)
treed8dcc102f744cc1607342dc65f5f4da8f0324681 /indra/newview/app_settings/shaders/class2
parent46702c4e80e96cd8dbe7f37d5c14fbb1830e798d (diff)
DRTVWR-559 Auto exposure tuning (fix horizon).
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl4
1 files changed, 3 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 12a99edc34..c2527db218 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
@@ -63,7 +63,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);
+ float scale = sun_up_factor + 1;
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
@@ -141,7 +143,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;
+ sunlit = sunlight.rgb / scale;
amblit = tmpAmbient.rgb * 0.25;
additive *= vec3(1.0 - combined_haze);