mapbox-gl-native icon indicating copy to clipboard operation
mapbox-gl-native copied to clipboard

z-fighting on layers with overlapping polygons

Open danswick opened this issue 10 years ago • 4 comments

Platform: Android, iOS, macOS Mapbox SDK version: 4.2.0-beta.3 on Android and iOS v3.4.0-alpha.5

Steps to trigger behavior

  1. Ensure your style contains a fill layer with some transparency at least one incidence of overlapping polygons.
  2. Bring overlapping polygons into view.
  3. Tilt the map.

Expected behavior

Area of overlap between polygons should be less transparent than non-overlapping areas.

Actual behavior

Area of overlap flickers as the map is moved and evidence of z-fighting is visible (see screenshots below).

I went ahead and created some overlapping polygons in the dataset editor and added them to the Mapbox Light style (html embed page here). z-fighting is not present on the web using Mapbox GL JS, but is visible on an Android device (Nexus 5x running Android 7) as well as on macOS:

image Android

image macOS

cc @1ec5 @alinapaz

danswick avatar Oct 06 '16 01:10 danswick

@boundsj Clarifying we're seeing this issue with some custom styles as well.

alinapaz avatar Oct 06 '16 18:10 alinapaz

@ansis @kkaefer Thoughts?

jfirebaugh avatar Oct 11 '16 21:10 jfirebaugh

This issue mentions iOS, Android, and OSX; I just wanted to add that it happens in Ubuntu as well. Here are some more screens: screen shot 2017-07-17 at 11 28 34 am (Not tilted)

screen shot 2017-07-17 at 11 28 23 am (Tilted) screen shot 2017-07-17 at 11 28 07 am (Tilted more)

edit: Oops, sorry. I found this issue from Google - the screenshots above are from Mapbox GL Js, not Mapbox GL Native.

foundryspatial-duncan avatar Jul 17 '17 18:07 foundryspatial-duncan

Fixed by #9930 on master and #9942 for iOS 3.6.3 / Android 5.1.4.

jfirebaugh avatar Sep 08 '17 20:09 jfirebaugh