[SOLVED] OpenGL ES artifacts

I noticed that on some older phones, there are visual artifacts:

The image shows a PC browser vs an Android emulator with ES 1.1/2.0 setting. You may notice the score font smudging, shadow artifacts, etc. If I switch the emulator to target max version (up to 3.1), then the artifacts go away.

I had the same artifacts on my Samsung phone, when it had an old Android version (lollipop 5 or 5.1, can’t remember). I feel like my game is super simple graphics wise, and I do wish to include old phones as well. However with this fidelity, I would probably just not allow older Androids. The game runs fine on them, though, if not for the visual errors. Is there an easy way to disable some shadow setting in the editor or change rendering options, which might bring up those artifacts? Anyone knows where I could even start the research?

Hi @LeXXik,

For the shadows issue, are you using real-time shadows? Did you try any other shadow type/resolution combination? Sometimes there are indeed artifacts due to lack of precision.

image

1 Like

Hi, @Leonidas! Correct, using the directional light to drop soft shadows on the ground from dynamic objects.

The culprit was Variance Shadow Map, as you pointed. All versions of it were causing the shadow artifacts, like halos and tints on older devices. Changing the resolution didn’t help, it only made artifacts look prettier :slight_smile: Switching to Shadow Map 3x3 fixed it. Ended up with Shadow Map 5x5, which presumably has a fallback to 3x3. Had to increase Normal Offset Bias to .3 as well to get rid of some last artifact lines, and here is the result:

The font is still smudged, though. You can see the score number as an example. Does the engine rasterize the font? Is there a way to mitigate it? The font is a UI 2D Text Element. All text elements in 2D Screens are like that. The image elements, like icons, are fine though:
image
image

1 Like

The text is rendered in real-time using a pixel shader, not sure why it uses such a low resolution though.

Try posting an issue on the engine repo about that!

1 Like