summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2023-02-27 16:53:56 -0600
committerDave Parks <davep@lindenlab.com>2023-02-27 16:53:56 -0600
commite5a2f85005bbf94f39ef048dbfe43276990f1154 (patch)
treece488770703c85e4ac1ce79dacdc2a419a2b44b5 /indra/newview/app_settings/shaders/class1
parent099fe4a70a95339c1709c3eb2a925d7a77c642cc (diff)
SL-19226 Reimplement water fresnel offset/scale, exposure balance for midday, adjust reflections off, and decruft depth buffer error correction shenanigans that are no longer used.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/reflectionmipF.glsl20
2 files changed, 3 insertions, 20 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
index f0e940eb5f..cc77712347 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredGammaCorrect.glsl
@@ -134,6 +134,7 @@ vec3 toneMap(vec3 color)
color *= exposure;
#ifdef TONEMAP_ACES_NARKOWICZ
+ color *= 0.8;
color = toneMapACES_Narkowicz(color);
#endif
@@ -145,7 +146,7 @@ vec3 toneMap(vec3 color)
// boost exposure as discussed in https://github.com/mrdoob/three.js/pull/19621
// this factor is based on the exposure correction of Krzysztof Narkowicz in his
// implemetation of ACES tone mapping
- color /= 0.6;
+ color *= 0.85/0.6;
color = toneMapACES_Hill(color);
#endif
diff --git a/indra/newview/app_settings/shaders/class1/interface/reflectionmipF.glsl b/indra/newview/app_settings/shaders/class1/interface/reflectionmipF.glsl
index 9f7706fe36..45267e4403 100644
--- a/indra/newview/app_settings/shaders/class1/interface/reflectionmipF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/reflectionmipF.glsl
@@ -26,29 +26,11 @@
out vec4 frag_color;
uniform sampler2D diffuseRect;
-uniform sampler2D depthMap;
-
-uniform float resScale;
-uniform float znear;
-uniform float zfar;
in vec2 vary_texcoord0;
-// get linear depth value given a depth buffer sample d and znear and zfar values
-float linearDepth(float d, float znear, float zfar);
-
void main()
{
- float depth = texture(depthMap, vary_texcoord0.xy).r;
- float dist = linearDepth(depth, znear, zfar);
-
- // convert linear depth to distance
- vec3 v;
- v.xy = vary_texcoord0.xy / 512.0 * 2.0 - 1.0;
- v.z = 1.0;
- v = normalize(v);
- dist /= v.z;
-
vec3 col = texture(diffuseRect, vary_texcoord0.xy).rgb;
- frag_color = vec4(col, dist/256.0);
+ frag_color = vec4(col, 0.0);
}