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 some math used by disableDepthDistance #5735

Merged
merged 2 commits into from
Aug 10, 2017
Merged

Fix some math used by disableDepthDistance #5735

merged 2 commits into from
Aug 10, 2017

Conversation

emackey
Copy link
Contributor

@emackey emackey commented Aug 9, 2017

Fixes #5501, fixes #5331, fixes #5621.

This closes 3 issues, but somehow still doesn't feel perfect. In particular, Number.POSITIVE_INFINITY tends to show through the globe very reliably now, whereas before it was spotty.

The original math error was along these lines:

    (z/w) < -1 || (z/w) > 1

This had been "simplified" by multiplying both sides by w, like so:

    z < -w || z > w

This simplification only works for positive values of w (the greater-than/less-than sense gets swapped for negative values of w).

/cc @bagnell @rahwang @tfili

@cesium-concierge
Copy link

@emackey thanks for the pull request!

I noticed that CHANGES.md has not been updated. If this change updates the Cesium API in any way, fixes a bug, or makes any non-trivial update, please add a bullet point to CHANGES.md and bump this pull request so we know it was updated. For more info, see the Pull Request Guidelines.

I am a bot who helps you make Cesium awesome! Thanks again.

@rahwang
Copy link
Contributor

rahwang commented Aug 9, 2017

Amazing! Thank you, thank you @emackey ! Is there any chance we could get this merged ASAP so it can make it into the workshop code?

@emackey
Copy link
Contributor Author

emackey commented Aug 9, 2017

@rahwang Can you try copying this into your project prior to merge, for an additional test?

@rahwang
Copy link
Contributor

rahwang commented Aug 9, 2017

screen shot 2017-08-09 at 2 48 08 pm

Officially no more labels in the sky! You da man, @emackey!

@emackey
Copy link
Contributor Author

emackey commented Aug 9, 2017

Updated CHANGES.md. This is ready.

@bagnell
Copy link
Contributor

bagnell commented Aug 10, 2017

Thanks @emackey! This looks good to me.

@bagnell bagnell merged commit 3958c02 into master Aug 10, 2017
@bagnell bagnell deleted the depth-math branch August 10, 2017 00:23
@thw0rted
Copy link
Contributor

Will this be included in 1.37? It was a significant issue for us.

@mramato
Copy link
Contributor

mramato commented Aug 10, 2017

Will this be included in 1.37? It was a significant issue for us.

Yes, anything merged into the master branch is always available in the next release (which is almost always the first business day of the month). In this case, Sep 1st.

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