mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-23 10:11:33 +00:00
make refraction more visible even at a distance
This commit is contained in:
parent
8f996d0bce
commit
845e3944d6
1 changed files with 5 additions and 1 deletions
|
@ -236,7 +236,11 @@ void main(void)
|
||||||
if (cameraPos.z < 0.0)
|
if (cameraPos.z < 0.0)
|
||||||
refraction = clamp(refraction * 1.5, 0.0, 1.0);
|
refraction = clamp(refraction * 1.5, 0.0, 1.0);
|
||||||
else
|
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
|
// sunlight scattering
|
||||||
// normal for sunlight scattering
|
// normal for sunlight scattering
|
||||||
|
|
Loading…
Reference in a new issue