Search Issue Tracker

Won't Fix

Votes

0

Found in

2021.3.35f1

2022.3.20f1

2023.2.11f1

2023.3.0b8

Issue ID

UUM-64705

Regression

Yes

[Android] Excessive Z-fighting occurs between two polygons when on Android

--

-

Reproduction steps:
1. Open the attached project “Zproject”
2. Build And Run on Android
3. Observe the train GameObject windows

Expected result: There is no Z-fighting visible (i.e. no flickering of the windows)
Actual result: Excessive Z-fighting is visible between the red and blue polygon on the train windows

Reproducible with:  2021.3.0f1, 2021.3.35f1, 2022.3.20f1, 2023.2.11f1, 2023.3.0b8
Not reproducible with: 2020.3.48f1

Reproducible with these devices:
VLNQA00518 - Google Pixel 4 (Pixel 4), CPU: Snapdragon 855 SM8150, GPU: Adreno 640, OS: 12
VLNQA00414 - Galaxy Note10+ 5G (SM-N976V), CPU: Snapdragon 855 SM8150, GPU: Adreno 640, OS: 9
VLNQA00591 - Samsung Galaxy S23 (SM-S911B), CPU: Snapdragon 8 Gen 2 (SM8550), GPU: Adreno 740, OS: 14
VLNQA00278 - Xiaomi Redmi Note 7 (Redmi Note 7), CPU: Snapdragon 660, GPU: Adreno 512, OS: 9.0.0
VLNQA00139 - Vivo Xplay6 (vivo Xplay6), CPU: Snapdragon 820 MSM8996, GPU: Adreno 530, OS: 7.1.1
VLNQA00132 - Xiaomi Mi 5s (MI 5s), CPU: Snapdragon 820 MSM8996, GPU: Adreno 530, OS: 6.0.1
Pixel 4XL (by user)

Testing environment: macOS (Intel) 14.2.1, Windows 10 (10.0.19045) 64bit (by user)

Notes:
- The issue was not reproducible on the first four devices when Vulkan Graphics API was used
- Not Reproducible on Standalone (macOS)

  1. Resolution Note:

    The regression is caused because one of the sub-meshes of the object is using dynamic batching after upgrading to 2021.

    In 2020 the sub-mesh is dynamically batched in editor but not in the player. At build time the mesh is disqualified from dynamic batching. The issue can be reproduced on 2020 by enabling r/w on the mesh, as this negates the build time decision and qualifies the mesh for dynamic batching at runtime.

    In 2021 the build time check was modified to produce consistent results between Editor and Player. Unfortunately, the dynamic batching causes the observed artefacts together with other components such as being far away from the origin. Dynamic batching transforms the vertices to world space.

    Reverting the change done in 2021 would regress other users that expect the object to be batched.

    Note that the change done in 2021 should only impact meshes that have at least two sub-meshes. From which there's at least one sub-mesh with more than 300 vertices and one sub-mesh with less than 300 vertices.

    Documentation for dynamic batching:
    https://docs.unity3d.com/2021.2/Documentation/Manual/dynamic-batching.html

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.