-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core] Filter out child tiles that overlap with parent tile #13963
Conversation
Related GL-JS issue: mapbox/mapbox-gl-js#6768 |
db88510
to
057cba2
Compare
057cba2
to
6a2764b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % nit
@@ -187,4 +200,33 @@ bool RenderCircleLayer::queryIntersectsFeature( | |||
return false; | |||
} | |||
|
|||
RenderLayer::RenderTiles RenderCircleLayer::filterRenderTiles(RenderTiles tiles_) const { | |||
RenderTiles tiles = RenderLayer::filterRenderTiles(tiles_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: RenderLayer::filterRenderTiles(std::move(tiles_));
Could this approach introduce flickering in existing tiles? I'm trying to understand what would happen in this case.
Does the If it does introduce flickering it could still be much better than the current flickering! I'm not sure how else this could be fixed. Maybe a uniform could be passed to the vertex shader that specifies which parts of the tile are covered by child tiles? It could then use that to drop features from the parent tile that are in areas covered by child tiles. |
Yes, it does. Also, I think there is a problem related to cached tiles. One missing child tile should not make rest of loaded / cached tiles non-renderable. I need to rewrite PR and approach the issue differently, options:
|
Need to rewrite PR. |
Whenever map is panned or zoomed and some of the tiles at the current zoom level are not loaded, cached parent tile may be used until missing tile is loaded. The problem is that whenever circle layer is non-opaque or has blur, parent tile will be drawn together with children (overdraw) causing flickering, as the non-opaque pixels are blended together.
This PR adds filter for circle layer in order to avoid rendering parent and children tiles covering same area.
Checklist