Skip to content
Snippets Groups Projects
Commit c0958922 authored by David Parks's avatar David Parks
Browse files

DRTVWR-559 Auto exposure tuning (fix horizon).

parent 46702c4e
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ void main()
vary_LightNormPosDot = rel_pos_lightnorm_dot;
// Initialize temp variables
vec3 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color;
vec3 sunlight = (sun_up_factor == 1) ? sunlight_color*2.0 : moonlight_color;
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
......
......@@ -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);
......
......@@ -212,7 +212,6 @@ void main()
{
//should only be true of WL sky, just port over base color value
color = srgb_to_linear(texture2D(emissiveRect, tc).rgb);
color *= sun_up_factor + 1.0;
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment