From 91cf2b42c88eba201431b3c56a853cda26f3e7cb Mon Sep 17 00:00:00 2001 From: NULL511 Date: Sat, 15 Jun 2024 00:56:13 -0400 Subject: [PATCH] back normal fix --- shaders/dimensions/physics_ocean.fsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shaders/dimensions/physics_ocean.fsh b/shaders/dimensions/physics_ocean.fsh index dd9135c..02be15a 100644 --- a/shaders/dimensions/physics_ocean.fsh +++ b/shaders/dimensions/physics_ocean.fsh @@ -518,6 +518,8 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) WavePixelData wave = physics_wavePixel(physics_localPosition.xz, waviness, physics_iterationsNormal, physics_gameTime); vec3 NormalTex = wave.normal; + if (isEyeInWater == 1 && !gl_FrontFacing) NormalTex = -NormalTex; + // tangent space normals for refraction TangentNormal = NormalTex.xy*0.5+0.5;