Antialiasing on mobile messes with 3D rendering

If you set antialiasing on “Always” in your project’s settings, playing your game on Android will display 3D objects in an incorrect order, sometimes even in front of the UI layers.

The first screenshot shows my game running on android, with antialising disabled for mobile
→ everything is rendered correctly, the UI (which is on a separate layer) is displayed in front of the 3D scene

The second screenshot shows what my game looks like with antialiasing on, still on my android phone
→ layers are rendered incorrectly, the UI is obstructed by the 3D scene.

Please note that my 3D character (on its own separate layer too) sitting at the bottom right corner of the screen, on top of the UI, isn’t visible in the second screenshot.

My theory is that when antialiasing is on, objects are rendered in Z-order regardless of the layer, meaning that even if my character is several layers above the 3D layer, it gets rendered below because its Z coordinate is -150 while the floor of the 3D scene is at -1.

Hi Cledu!

It seems to be an important 3D bug that you have constated.

A+
Xierra

1 Like