Skip to content

Commit

Permalink
back normal fix
Browse files Browse the repository at this point in the history
  • Loading branch information
null511 committed Jun 23, 2024
1 parent dc17ff6 commit 30426d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shaders/dimensions/physics_ocean.fsh
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 30426d5

Please sign in to comment.