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

Two-pass labels intersect the depth buffer differently #5083

Closed
emackey opened this issue Mar 8, 2017 · 4 comments
Closed

Two-pass labels intersect the depth buffer differently #5083

emackey opened this issue Mar 8, 2017 · 4 comments

Comments

@emackey
Copy link
Contributor

emackey commented Mar 8, 2017

Noticed in #5066:

Here's an example of labels sticking into mountains. I know the text looks crowded and bad, but there are not supposed to be any holes in the glyphs. The holes appear to be the opaque pass finding different depths to intersect than the translucent pass.

Cesium 1.28 needs to be manually set to "Natural Earth II" base map, but then it works, and it looks fine:

Cesium 1.30 exhibits the label depth strangeness:

bigbadlabels

@emackey
Copy link
Contributor Author

emackey commented Mar 8, 2017

I did git bisect this, and indeed it was introduced with #4886. This is not a surprise, since that is the change that separated these labels into two passes, and clearly the two passes have different ideas about where that mountain is.

@mramato
Copy link
Contributor

mramato commented Mar 8, 2017

I labeled this a priority and next release. It's a pretty bad regression for anyone clamping labels to terrain.

@emackey
Copy link
Contributor Author

emackey commented Mar 10, 2017

@mramato Here's a workaround to get the old behavior, for now:

                showBackground : true,
                backgroundColor : Cesium.Color.TRANSPARENT

@bagnell
Copy link
Contributor

bagnell commented Mar 16, 2017

The holes appear to be the opaque pass finding different depths to intersect than the translucent pass.

This is exactly what is happening. During the opaque pass, we overlap the frustums by a small percentage. During the translucent pass, there is no overlap leading to slightly different depths to the opaque pass.

Removing the overlap from the opaque pass fixes the problem, but it should cause tearing of opaque geometry on frustum boundaries. I need to test more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants