Skip to content

Commit

Permalink
Fix z-fighting of translucent fills
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Aug 30, 2017
1 parent 45fde16 commit 79585ce
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/render/draw_fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function drawFill(painter: Painter, sourceCache: SourceCache, layer: FillStyleLa
// Once we switch to earcut drawing we can pull most of the WebGL setup
// outside of this coords loop.
painter.setDepthSublayer(1);
painter.depthMask(painter.isOpaquePass);
drawFillTiles(painter, sourceCache, layer, coords, drawFillTile);
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64
}
},
"pitch": 40,
"bearing": 20,
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Polygon",
"coordinates": [
[
[
-20,
-20
],
[
-20,
20
],
[
20,
20
],
[
20,
-20
],
[
-20,
-20
]
]
]
},
{
"type": "Polygon",
"coordinates": [
[
[
-25,
-25
],
[
-25,
25
],
[
25,
25
],
[
25,
-25
],
[
-25,
-25
]
]
]
}
]
}
}
},
"sprite": "local://sprites/emerald",
"layers": [
{
"id": "fill",
"type": "fill",
"source": "geojson",
"paint": {
"fill-antialias": false,
"fill-color": "blue",
"fill-opacity": 0.5
}
}
]
}

0 comments on commit 79585ce

Please sign in to comment.