Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

z-fighting on layers with overlapping polygons #6604

Closed
danswick opened this issue Oct 6, 2016 · 4 comments
Closed

z-fighting on layers with overlapping polygons #6604

danswick opened this issue Oct 6, 2016 · 4 comments
Labels
Android Mapbox Maps SDK for Android bug Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS

Comments

@danswick
Copy link
Contributor

danswick commented Oct 6, 2016

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

@boundsj boundsj added bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl labels Oct 6, 2016
@alinapaz
Copy link

alinapaz commented Oct 6, 2016

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

@jfirebaugh
Copy link
Contributor

@ansis @kkaefer Thoughts?

@foundryspatial-duncan
Copy link

foundryspatial-duncan commented Jul 17, 2017

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.

@jfirebaugh
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android bug Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS
Projects
None yet
Development

No branches or pull requests

5 participants