Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

label double drawing when overscaling #194

Closed
ansis opened this issue Nov 20, 2013 · 2 comments
Closed

label double drawing when overscaling #194

ansis opened this issue Nov 20, 2013 · 2 comments

Comments

@ansis
Copy link
Contributor

ansis commented Nov 20, 2013

The plan to render cross-tile labels is to let tiles actually draw glyphs across boundaries. Collisions are prevented in preprocessing. Double drawing is prevented by only adding glyphs to the tile the anchor is located in. This gets complicated when you consider overscaling.

If placement is done right you won't have any collisions between parent and child tiles, but you could have double drawing.

 _________
|   P     |
|     ____|
|    |  C |
|____|____|
     ^
    this is a boundary while drawing, but the anchor might be in both
    in which case the glyph would be double-drawn.

I don't see how we can clip glyphs in the parent based on their anchor.

I'm seeing two options:
A. Clip the normal way with a depth or stencil buffer and include data for cross-tile labels in both tiles.
B. Let the parent tile draw all its labels, and have the child tile only draw labels that appear after the parent tile's max placement zoom.

I think B is better.

@mourner mourner added this to the future milestone Jun 24, 2014
@mourner
Copy link
Member

mourner commented Jan 29, 2015

I've never seen label double drawing in practice, do you?

@ansis
Copy link
Contributor Author

ansis commented Jan 29, 2015

It does show up sometimes, but this isn't something that can be fixed separately from bigger changes.

@ansis ansis closed this as completed Jan 29, 2015
bensleveritt pushed a commit to bensleveritt/mapbox-gl-js that referenced this issue Oct 24, 2016
lucaswoj pushed a commit that referenced this issue Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants