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 pickPosition called after sampleHeight #7113

Merged
merged 5 commits into from
Oct 15, 2018
Merged

Conversation

lilleyse
Copy link
Contributor

@lilleyse lilleyse commented Oct 2, 2018

Fixes #7111

If the previous pass was a sampleHeight call the state would be wrong for the pickPosition call. This resets frameState and uniformState in pickPosition.

Specifically SceneTransforms.drawingBufferToWgs84Coordinates requires log depth and inverse view projection to be correct.

Slightly modified demo as #711 I used for testing: localhost:8080 link

  • Still need to do more testing and write a unit test.
  • I wonder now if pickTranslucentDepth really requires a manual scene.render call. It should be able to do something similar to this I think.
  • CHANGES.md

@cesium-concierge
Copy link

Thanks for the pull request @lilleyse!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@lilleyse
Copy link
Contributor Author

lilleyse commented Oct 4, 2018

Updated. @bagnell could you review?

@lilleyse
Copy link
Contributor Author

lilleyse commented Oct 4, 2018

Also @ggetz can you test this in the demo where you first ran into this problem?

@ggetz
Copy link
Contributor

ggetz commented Oct 5, 2018

I'm still having problems picking when zoomed in close to the entity in this example

When the camera is close to the entity, it doesn't work at all. At a medium zoom level, it works at positions that are far enough from the camera. It works fine when the camera is zoomed out far enough. Could it be a picking frustum issue?

@lilleyse
Copy link
Contributor Author

lilleyse commented Oct 5, 2018

That might be a different problem related to the label offsets. I see it too when clampToHeight isn't called. With a few label tweaks it seems to work better:

Modified example

@ggetz
Copy link
Contributor

ggetz commented Oct 5, 2018

@lilleyse Got it. I'm not running into any other picking problems here, and this also resolves the issue with the original tileset I saw. Thanks!

@lilleyse
Copy link
Contributor Author

Merged in master. @bagnell could you review?

@bagnell bagnell merged commit e0e76ba into master Oct 15, 2018
@bagnell bagnell deleted the fix-pick-position branch October 15, 2018 19:47
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

Successfully merging this pull request may close these issues.

4 participants