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

Added pixel ratio to czm_metersPerPixel #8318

Merged
merged 1 commit into from
Oct 25, 2019
Merged

Added pixel ratio to czm_metersPerPixel #8318

merged 1 commit into from
Oct 25, 2019

Conversation

IanLilleyT
Copy link
Contributor

@IanLilleyT IanLilleyT commented Oct 25, 2019

After closing #8113 we noticed that "Size billboard in meters" inside this sandcastle looked different at varying resolution scales. Turns out I missed the czm_metersPerPixel function which is used by billboards, clipping planes, and ground polylines. So now czm_metersPerPixel handles the pixel ratio multiply and these shaders no longer do their own czm_pixelRatio multiply.

I confirmed that polylines, billboards, and clipping planes work consistently between resolution scales

@cesium-concierge
Copy link

Thanks for the pull request @IanLilleyT!

  • ✔️ 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.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

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

@lilleyse
Copy link
Contributor

Thanks @IanLilleyT

@lilleyse lilleyse merged commit a5e5566 into master Oct 25, 2019
@lilleyse lilleyse deleted the billboardFixes branch October 25, 2019 15:16
OmarShehata pushed a commit that referenced this pull request Nov 2, 2019
In #8318 we added a multiplication by czm_pixelRatio in metersPerPixel.glsl. This caused a second globe to render at half the size when globe lighting was enabled. This fixes it by dividing back by that value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants