From f5fb3ae27140d7455956ba7264dc0a545fb2ec3c Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 29 Mar 2023 16:53:19 -0500 Subject: DRTVWR-559 Drop the upper bound on exposure. --- indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl index 689929fe38..ff37f9e4b3 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl @@ -82,7 +82,7 @@ void main() float L = lum(col); - float s = clamp(0.1/L, 0.5, 4.0); + float s = clamp(0.1/L, 0.5, 2.0); float prev = texture(exposureMap, vec2(0.5,0.5)).r; s = mix(prev, s, min(dt*2.0, 0.04)); -- cgit v1.2.3 From 6162b9208a087f78eba609d3fe9da5c8385f7ade Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 30 Mar 2023 10:41:04 -0500 Subject: DRTVWR-559 Add RenderAutomaticReflectionProbes control. Tweak automatic exposure. --- indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl | 4 ++-- .../shaders/class1/deferred/postDeferredGammaCorrect.glsl | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl index ff37f9e4b3..b325f55576 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl @@ -46,7 +46,7 @@ float lum(vec3 col) void main() { - float step = 1.0/32.0; + float step = 1.0/16.0; float start = step; float end = 1.0-step; @@ -82,7 +82,7 @@ void main() float L = lum(col); - float s = clamp(0.1/L, 0.5, 2.0); + float s = clamp(0.1/L, 0.5, 2.5); float prev = texture(exposureMap, vec2(0.5,0.5)).r; s = mix(prev, s, min(dt*2.0, 0.04)); diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl index 4ac1ff9368..221de0b095 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl @@ -125,7 +125,6 @@ vec3 toneMap(vec3 color) // this factor is based on the exposure correction of Krzysztof Narkowicz in his // implemetation of ACES tone mapping color *= 1.0/0.6; - //color /= 0.6; color = toneMapACES_Hill(color); #endif -- cgit v1.2.3 From b5917fbd16022e4c4d2cf7ef41b21fdea4828c9e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 30 Mar 2023 13:14:23 -0500 Subject: DRTVWR-559 Reduce probe flashing and exposure flickering. --- indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl index b325f55576..1c1984e8ee 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl @@ -55,13 +55,13 @@ void main() vec3 col; - vec2 nz = noiseVec * step * 0.5; + //vec2 nz = noiseVec * step * 0.5; for (float x = start; x <= end; x += step) { for (float y = start; y <= end; y += step) { - vec2 tc = vec2(x,y) + nz; + vec2 tc = vec2(x,y); // + nz; vec3 c = texture(diffuseRect, tc).rgb + texture(emissiveRect, tc).rgb; float L = max(lum(c), 0.25); @@ -84,9 +84,11 @@ void main() float s = clamp(0.1/L, 0.5, 2.5); + float prev = texture(exposureMap, vec2(0.5,0.5)).r; - s = mix(prev, s, min(dt*2.0, 0.04)); + s = mix(prev, s, min(dt*2.0*abs(prev-s), 0.04)); + frag_color = vec4(s, s, s, dt); } -- cgit v1.2.3 From 46702c4e80e96cd8dbe7f37d5c14fbb1830e798d Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 30 Mar 2023 18:19:32 -0500 Subject: DRTVWR-559 Auto exposure tuning. --- .../newview/app_settings/shaders/class1/deferred/exposureF.glsl | 9 ++++----- indra/newview/app_settings/shaders/class1/deferred/skyV.glsl | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1') 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 -- cgit v1.2.3 From c0958922c3b3015fd7f17781a79032050b2ed387 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 30 Mar 2023 18:41:34 -0500 Subject: DRTVWR-559 Auto exposure tuning (fix horizon). --- indra/newview/app_settings/shaders/class1/deferred/skyV.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl index 62d134188c..0090155e5c 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 : 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 -- cgit v1.2.3