summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-03-30 18:19:32 -0500
committerDave Parks <davep@lindenlab.com>2023-03-30 18:19:32 -0500
commit46702c4e80e96cd8dbe7f37d5c14fbb1830e798d (patch)
tree69e16b29fc885574b4e5d4452fbc3392ff08553a /indra/newview/app_settings/shaders/class1
parent70bdf55439a57116cbd2c9bb32e78a8ada251d78 (diff)
DRTVWR-559 Auto exposure tuning.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl9
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyV.glsl2
2 files changed, 5 insertions, 6 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