Closed westnordost closed 4 years ago
Is this a regression in the latest Tangram - did this work properly in the past? Is it possible that this problem only appeared when using the blend:add
or blend:multiply
blend modes in the style?
I figured that as tiles can not overlap, it can't be a problem of the tiles.
I haven't used that tile service specifically, but most tile services do intentionally overlap, repeating some data in a buffer area in order to help with labeling and stroking across tile edges, for example a 4096x4096 tile has data from -100 to 4196. Most renderers then clip the actual displayed tile to 0,0,4096,4096. Is it possible Tangram is designed with different assumptions for the overlapping buffer? I haven't looked closely at the code yet.
Is this a regression in the latest Tangram - did this work properly in the past?
I don't know
Hi, yes, sorry to let this one slip through the cracks. @bdon is correct, this is a known issue with blending and buffered tiles specifically, as noted in #469. While Tangram is meant for use with any tile source, most core features were initially developed with the Tilezen schema in mind, and those tiles are not buffered. Since that linked issue was written, we did add some use of stencil buffer for blending in #704. That PR addresses a different but related issue; the stencil approach used there could possibly be adapted/extended to solve this issue, however it would cause problems with 3d extruded geometry (to my knowledge, other renderers that use buffered tiles such as Mapbox GL use a separate rendering pass for extruded geometry specifically; I'm not sure it's possible to arrange rendering order in Tangram in a way that would work for all these blending cases while also honoring the blend_order
parameter). So it remains an open issue but this is a good reminder :)
TANGRAM VERSION: 0.20.1 ENVIRONMENT: Firefox 77.0.1, Windows 10
TO REPRODUCE THE ISSUE, FOLLOW THESE STEPS:
api_key: Zv2Mm3fkkjfqjWQ7bZ8xradVnzJv8ZlRBqtSYkZoNuBRhcpB5n8l58aU6YYGvfYB
to the globals. (This is a temporary token that will be revoked when this bug is closed). The map should render (almost fine) nowRESULT:
EXPECTED RESULT:
The same, but without the overlapping polygons at the tile edges. I figured that as tiles can not overlap, it can't be a problem of the tiles. They also render fine with mapbox, as shown here: https://www.jawg.io/en/maps/#13.66/51.87577/10.46222
STYLE USED
This should be the relevant section of the used stylesheet (in
land.yaml
):