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 frustumSplits option to DebugCameraPrimitive #8849

Merged
merged 3 commits into from
May 13, 2020

Conversation

IanLilleyT
Copy link
Contributor

Fixes #8848

This lets the creator of a DebugCameraPrimitive optionally supply the frustum splits to use when rendering the debug camera. This is useful for debugging multi-frustum cameras. If not specified, the frustum splits are the near and far values of the camera, which is the desired behavior for the average Camera object.

The old way always used FrameState's frustum splits, which didn't make sense for arbitrary cameras.

Example with near value of 1 and far value of 10000000 (almost diameter of earth)

Before:

Screen Shot 2020-05-13 at 2 24 17 PM

After:

Screen Shot 2020-05-13 at 2 23 38 PM

@IanLilleyT IanLilleyT requested a review from lilleyse May 13, 2020 18:33
@cesium-concierge
Copy link

Thanks for the pull request @IanLilleyT!

  • ✔️ Signed CLA found.

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

Confirmed that this works for a user-created DebugCameraPrimitive and the DebugCameraPrimitive used in Cesium Inspector. Thanks @IanLilleyT.

@lilleyse lilleyse merged commit 1fba8a9 into master May 13, 2020
@lilleyse lilleyse deleted the cameraDebugPrimitive branch May 13, 2020 20:05
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.

DebugCameraPrimitive uses FrameState's frustum splits even when using a custom camera
3 participants