diff --git a/src/render/opengl/shaders/water.frag b/src/render/opengl/shaders/water.frag index 4c00fe8..1f5a9d7 100644 --- a/src/render/opengl/shaders/water.frag +++ b/src/render/opengl/shaders/water.frag @@ -28,7 +28,9 @@ void main(void) gl_FragColor = applyLighting(unprojected, normal, waterColor, 100.0); - gl_FragColor += getSkyColor(unprojected, reflect(unprojected - cameraLocation, normal)) * waterReflection; + vec3 reflected = reflect(unprojected - cameraLocation, normal); + reflected.y = max(reflected.y, 0.0); + gl_FragColor += getSkyColor(unprojected, reflected) * waterReflection; gl_FragColor = applyAerialPerspective(gl_FragColor);