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

Fix rendering artifacts with round line joins and semi-transparent or gap-width lines #794

Closed
lbud opened this issue Oct 24, 2014 · 5 comments
Labels

Comments

@lbud
Copy link
Contributor

lbud commented Oct 24, 2014

test case: https://www.mapbox.com/bites/00059/#15.1/36.9060/-76.0800

image

image

@lbud lbud added the bug 🐞 label Oct 24, 2014
@lbud lbud changed the title Round line joins + blur look knobby Round line joins with semi-transparent or gap-width lines Jan 29, 2015
@lbud
Copy link
Contributor Author

lbud commented Jan 29, 2015

(follow-up from #681)
More clearly:
image
image

@ljbade
Copy link

ljbade commented Feb 3, 2015

I have noticed this in native too. Came up recently when my line dashes were bugging out but still see it on other transparent lines.

@ansis
Copy link
Contributor

ansis commented Jun 26, 2015

We now skip adding round joins for shallow joins where miters are indistinguishable from round joins. This removes most of the dots within a segment. There are still overlapping dots where different segments meet:

screen shot 2015-06-26 at 12 32 23 pm
all roads in the image have "line-join": "round"

We could make the tessellation slightly more complicated to get rid of all overlap within a segment, but I don't think this matters if we don't also get rid of overlap across different segments.

For overlap between different segments there are two ways this could be done:

  • draw into a separate texture first, then composite it. We tried this. It's too slow.
  • prevent double drawing with the depth buffer. With this approach lines would be drawn twice. Once for the solid part and once for the antialiased/blurred edge. There would still be tiny 1px artifacts where the antialiased/blurred edges for different features overlap, but I don't think we can avoid that without having a huge performance cost. Something similar could be implemented for polygons.

@lucaswoj lucaswoj changed the title Round line joins with semi-transparent or gap-width lines Fix rendering artifacts with round line joins and semi-transparent or gap-width lines Jul 28, 2016
@mourner
Copy link
Member

mourner commented May 22, 2019

It seems like currently only sharp corners have this problem:

image

@mourner
Copy link
Member

mourner commented Sep 11, 2019

Closing as we addressed this well enough it seems.

@mourner mourner closed this as completed Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants