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 ground atmosphere shaders in 3D orthographic mode #12484

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

andrewda
Copy link
Contributor

Description

3D orthographic mode is currently broken with the default globe options (i.e., showGroundAtmosphere = true -- see the Projection sandcastle). The behavior can be fixed by setting showGroundAtmosphere = false. See the attached videos:

Before (showGroundAtmosphere = true)
CleanShot.2025-02-19.at.11.26.20.mp4
Before (showGroundAtmosphere = false)
CleanShot.2025-02-19.at.11.28.42.mp4

This pull request fixes the ground atmosphere shaders so that 3D orthographic mode works by default. See the attached video of this fix, with showGroundAtmosphere = true:

CleanShot.2025-02-19.at.11.28.11.mp4

Issue number and link

#11955

Testing plan

Manual testing with the Projection sandcastle, or with the following code:

const viewer = new Cesium.Viewer("cesiumContainer");

// Setting `showGroundAtmosphere = false` is required for orthographic 3D mode prior to this change
//viewer.scene.globe.showGroundAtmosphere = false;

viewer.scene.camera.switchToOrthographicFrustum();

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

Copy link

Thank you for the pull request, @andrewda!

✅ We can confirm we have a CLA on file for you.

@ggetz
Copy link
Contributor

ggetz commented Feb 20, 2025

Looks great @andrewda! I was able to confirm the artifacts from #11955 are no longer reproducible in this branch.

Thanks for the fix!

@ggetz ggetz added this pull request to the merge queue Feb 20, 2025
Merged via the queue into CesiumGS:main with commit 8ca3597 Feb 20, 2025
4 checks passed
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.

2 participants