1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 18:32:36 +00:00

make refraction more visible even at a distance

This commit is contained in:
wareya 2021-03-19 17:54:08 -04:00
parent 8f996d0bce
commit 845e3944d6

View File

@ -236,7 +236,11 @@ void main(void)
if (cameraPos.z < 0.0)
refraction = clamp(refraction * 1.5, 0.0, 1.0);
else
refraction = mix(refraction, waterColor, clamp(depthSampleDistorted/VISIBILITY, 0.0, 1.0));
{
vec3 refractionA = mix(refraction, waterColor, clamp(depthSampleDistorted/VISIBILITY, 0.0, 1.0));
vec3 refractionB = mix(refraction, waterColor, clamp(realWaterDepth/VISIBILITY, 0.0, 1.0));
refraction = mix(refractionA, refractionB, 0.8);
}
// sunlight scattering
// normal for sunlight scattering