diff options
author | Qlonever <42286723+Qlonever@users.noreply.github.com> | 2023-04-12 15:49:30 -0400 |
---|---|---|
committer | elsid <elsid.mail@gmail.com> | 2023-04-16 16:04:53 +0200 |
commit | be10e0f85d691085b17c068250432b053cc524b3 (patch) | |
tree | ca09510dfd66b20c9dfde7fdedfdbd6b2bcca018 | |
parent | 3391083795249a673f5bf8c72c34078473e6113c (diff) |
Reduce range of radial fade with disabled reverse Zdepth-refraction
-rw-r--r-- | files/shaders/compatibility/water.frag | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/files/shaders/compatibility/water.frag b/files/shaders/compatibility/water.frag index 9dcffeacc4..d125c41a4b 100644 --- a/files/shaders/compatibility/water.frag +++ b/files/shaders/compatibility/water.frag @@ -153,8 +153,8 @@ void main(void) // while avoiding oddities when the water plane is close to the clipping plane #if @reverseZ radialise = radialDepth / linearDepth; - #else - radialise = mix(1.0, radialDepth / linearDepth, clamp(max(abs(cameraPos.z) - 14.0, 0.0) / 135.0, 0.0, 1.0)); + #else + radialise = mix(1.0, radialDepth / linearDepth, clamp(max(abs(cameraPos.z) - 15.0, 0.0) / 30.0, 0.0, 1.0)); #endif #else float radialDepth = 0.0; @@ -199,7 +199,7 @@ void main(void) else { depthCorrection = sqrt(1.0 + 4.0 * DEPTH_FADE * DEPTH_FADE); - refraction = mix(refraction, waterColor, clamp(DEPTH_FADE * DEPTH_FADE / (-0.5 * depthCorrection + 0.5 - waterDepthDistorted / VISIBILITY) + 0.5 * depthCorrection + 0.5, 0.0, 1.0)); + refraction = mix(refraction, waterColor, clamp(DEPTH_FADE * DEPTH_FADE / (-0.5 * depthCorrection + 0.5 - waterDepthDistorted / VISIBILITY) + 0.5 * depthCorrection + 0.5, 0.0, 1.0)); } // sunlight scattering |