I've got reports from some Linux users that the game's water isn't rendered on his machine.
3 example operating systems:
Ubuntu 20.04 (with kernel 5.4.0-54-generic x86_64
Linux 4.15 Linux Mint 19.2 64bit
Mac OS X 10.13.6
I use this shader: https://roystan.net/articles/toon-water.html
I've made a small change so I can use it in orthographic projection as well:
float existingDepthLinear = 0;
if (unity_OrthoParams.w > 0)
{
// orthographic camera
#if defined(UNITY_REVERSED_Z)
existingDepthLinear = 1.0f - existingDepth01;
#endif
existingDepthLinear = (existingDepthLinear * _ProjectionParams.z) + _ProjectionParams.y;
}
else
{
// perspective camera
existingDepthLinear = LinearEyeDepth(existingDepth01);
}
// Difference, in Unity units, between the water's surface and the object behind it.
float depthDifference = existingDepthLinear - i.screenPosition.z;
I've got a feeling that
#if defined(UNITY_REVERSED_Z)
existingDepthLinear = 1.0f - existingDepth01;
#endif
is what causing the issue.
When I remove it, on my PC, which was working well until now, the whole surface will be just foam. So plain white. Just like on their computers.
So maybe UNITY_REVERSED_Z is not defined?
What could cause this issue? Feel free to ask for more info, maybe I can provide.