Refraction in the water shader causes artifacts

GTX1050, Linux, proprietary driver v410.78.

  1. Enable water shader with refraction.
  2. Go into water (player character should be submerged).
  3. Switch to the 3d-person view.

As a result, underwater part of player will have a white outline:

Outline

It seems the issue with the lighting shader. There was a very similar bug #4143 (closed), which was caused by wrong interpolation with anti-aliasing.

I managed to track down the issue to this line, but I do not know how to debug it properly.

Edited by Andrei Kortunov