summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl9
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl1
5 files changed, 10 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
index 1c1984e8ee..861b78c961 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl
@@ -36,12 +36,11 @@ uniform sampler2D exposureMap;
uniform float dt;
uniform vec2 noiseVec;
-// calculate luminance the same way LLColor4::calcHSL does
+
float lum(vec3 col)
{
- float mx = max(max(col.r, col.g), col.b);
- float mn = min(min(col.r, col.g), col.b);
- return (mx + mn) * 0.5;
+ vec3 l = vec3(0.2126, 0.7152, 0.0722);
+ return dot(l, col);
}
void main()
@@ -82,7 +81,7 @@ void main()
float L = lum(col);
- float s = clamp(0.1/L, 0.5, 2.5);
+ float s = clamp(0.175/L, 0.125, 1.3);
float prev = texture(exposureMap, vec2(0.5,0.5)).r;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
index fc6291d438..62d134188c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
@@ -91,7 +91,7 @@ void main()
vary_LightNormPosDot = rel_pos_lightnorm_dot;
// Initialize temp variables
- vec3 sunlight = (sun_up_factor == 1) ? sunlight_color*2.0 : moonlight_color*0.75;
+ vec3 sunlight = (sun_up_factor == 1) ? sunlight_color : moonlight_color;
// Sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
index 0d3dbf85e2..12a99edc34 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsFuncs.glsl
@@ -62,8 +62,8 @@ 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 = 2.0;
- vec3 sunlight = (sun_up_factor == 1) ? sunlight_color * scale: moonlight_color*0.75;
+
+ vec3 sunlight = (sun_up_factor == 1) ? sunlight_color: moonlight_color;
// sunlight attenuation effect (hue and brightness) due to atmosphere
// this is used later for sunlight modulation at various altitudes
@@ -141,7 +141,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 / scale;
+ sunlit = sunlight.rgb;
amblit = tmpAmbient.rgb * 0.25;
additive *= vec3(1.0 - combined_haze);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
index 94c40b1fa0..677d83a1fe 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
@@ -676,7 +676,7 @@ void sampleReflectionProbesWater(inout vec3 ambenv, inout vec3 glossenv,
sampleReflectionProbes(ambenv, glossenv, tc, pos, norm, glossiness);
// fudge factor to get PBR water at a similar luminance ot legacy water
- glossenv *= 0.5;
+ glossenv *= 0.4;
}
void debugTapRefMap(vec3 pos, vec3 dir, float depth, int i, inout vec4 col)
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index 0e3ebd1534..b23741e574 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -212,6 +212,7 @@ 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
{