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

Problems with label backgrounds #4927

Closed
mramato opened this issue Jan 26, 2017 · 5 comments
Closed

Problems with label backgrounds #4927

mramato opened this issue Jan 26, 2017 · 5 comments

Comments

@mramato
Copy link
Contributor

mramato commented Jan 26, 2017

#4886 appears to cause problems for labels with backgrounds:

Run http://localhost:8080/Apps/Sandcastle/index.html?src=Ground%20Clamping.html&label=Showcases

The label text should be opaque and the background translucent, but there's an issue that makes the font appear as if it's behind it's background (not always). @bagnell thinks this is a draw order issue.

label

CC @emackey

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 26, 2017

Perhaps the background is not getting the new blendOption set correctly?

Otherwise, are we sure the background billboard collection is always added before the label billboard collection?

Otherwise, is >= depth test not set?

@emackey
Copy link
Contributor

emackey commented Jan 26, 2017

Does this only happen when clamped to ground? >= depth is set, and the = part is being relied upon, but I think the clamping might make the Z value a bit noisy.

@emackey
Copy link
Contributor

emackey commented Jan 26, 2017

Possibly related to #4736, clamped billboards can shake.

@bagnell
Copy link
Contributor

bagnell commented Jan 26, 2017

The problem seems to be sampling the texture. The default used by the texture atlas is linear. For smaller sized fonts, all of the sampled texels have an alpha < 1. You can test this by changing the label collection to use BlendOption.OPAQUE and no text will be drawn.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 26, 2017

If we need a workaround for this, we can also force BlendOption.TRANSLUCENT when a background is used. In practice, it will likely often be OK-ish more so then when there is no background.

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