I am trying to fix a bug where a couple partially transparent shaders look incorrect only on phones with Exynos / Mali hardware. The behavior is very much like z-fighting, but there is nothing to z-fight with. Sections are missing at random, presumably not passing the depth-test. The missing sections are random per frame.
I make this post not expecting a specific fix to my problem, but in hopes that someone knows the practical differences between Exynos / Mali phones and Snapdragon / Adreno phones.
A specific example:
The issue happens on Galaxy S8 SM-G950FD with Exynos 9 Octa 8895 and Mali-G71 MP20
The issue does not happen on Galaxy S8 SM-G950W with Qualcomm MSM8998 Snapdragon 835 and Adreno 540
I am on Unity 2018.4.22f1
Does anyone have any general knowledge on the possible differences here, or tips on how to debug this? I am at a loss, beyond just randomly changing my shader and hoping something works.
One thing I noted from searching is that the behavior when not clearing a buffer before using it is undefined, and could differ per chipset. Unfortunately I see a pass where we fill the depth buffer to 1, so I don’t think this is the issue.
Cropped for IP reasons. Hopefully this conveys enough.
The sections that are missing change every frame, but I now think that is because the shader has moving UVs, not a z-fighting / numerical imprecision type thing. So pretend that pattern was just stuck on there.
This leads me to look at the texture whose UVs are being moved. I will do that.
edit: The sections that are missing should be partially transparent sections, instead of all missing.
It does not look like the tile-based errors in the thread you linked, and in case it helps, I am using GLES 3.0 (Require ES3.1 is not checked) and the standard pipeline.
This looks more like a floating point precision issue or a division by zero, it’s hard to tell without seeing the shader code what it suppose to do. But I suspect that you have a “noise” or “random” function that takes UVs as input and multiplies it by crazy large number, ending up lossing precision and producing these discontinuities.