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 multifrustum seam artifacts #8205

Merged
merged 19 commits into from
Oct 21, 2019
Merged

Fix multifrustum seam artifacts #8205

merged 19 commits into from
Oct 21, 2019

Conversation

lilleyse
Copy link
Contributor

Fixes #4381

I decided not to go with the stencil approach mentioned in that issue because it would have gotten very complicated with derived commands.

The new idea is to keep two framebuffers, one for the globe and one for everything else. After all frustums have been rendered the "everything-else" framebuffer is overlayed above the globe framebuffer.

The new framebuffer is only created and used if depthTestAgainstTerrain = false and the number of frustums is greater than 1.

#8202 needs to be merged first. I also want to do more testing.

@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.
  • ❔ 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.

This reverts commit 9d46847.
@lilleyse
Copy link
Contributor Author

I checked most of the Sandcastle examples with log-depth and depth-test-against-terrain set to false and the only one that had an issue was the VR example. I pushed a fix for that.

@IanLilleyT ready to review

@lilleyse
Copy link
Contributor Author

You might notice this seam in the Sandcastle demo. I opened a separate issue for that #8216.

Selection_3067

@lilleyse
Copy link
Contributor Author

Since we're getting a little close to the release let's target this PR, #8203, and #8207 for after the 1.62 release.

@lilleyse
Copy link
Contributor Author

lilleyse commented Oct 2, 2019

@IanLilleyT this is ready to review

Copy link
Contributor

@IanLilleyT IanLilleyT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @lilleyse . The approach to separate globe and primitives into their own framebuffers can be extended for future features like underground rendering, so I like it. I'm wondering if the naming should change from GlobeDepth.js to something else.

Also, usePrimitiveFramebuffer is slightly confusing inside Scene. Maybe separatePrimitiveFramebuffer to convey that globe and primitive rendering can be separate?

@@ -17,13 +18,15 @@ define([
'../Shaders/PostProcessStages/DepthViewPacked',
Copy link
Contributor

@IanLilleyT IanLilleyT Oct 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DepthViewPacked unused in this file

Suggested change
'../Shaders/PostProcessStages/DepthViewPacked',

@@ -39,6 +42,7 @@ define([
DepthViewPacked,
Copy link
Contributor

@IanLilleyT IanLilleyT Oct 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DepthViewPacked unused in this file

Suggested change
DepthViewPacked,

@lilleyse
Copy link
Contributor Author

@IanLilleyT updated

@IanLilleyT IanLilleyT merged commit 03341cb into master Oct 21, 2019
@IanLilleyT
Copy link
Contributor

Looks good, thanks @lilleyse

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.

3D Tiles: Possible frustum artifact?
3 participants