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

Switch to two-pass shadow volumes for classification #8870

Merged
merged 1 commit into from
May 20, 2020

Conversation

lilleyse
Copy link
Contributor

@lilleyse lilleyse commented May 19, 2020

This changes classification from the 3-pass stencil preload method to the 2-pass zfail method described here.

#8854 needs to be merged first because it clamps the shadow volume to both the near and far planes which is a requirement for the 2-pass method. The 3-pass method only requires that geometry is clamped to the far plane.

In most cases this reduces shadow volume fillrate by 33% which should translate to better performance in scenes with many ground primitives.

What I tested so far:

  • Overlapping primitives
  • Concave primitives
  • Textured ground primitives
  • Ground polylines
  • Classification on 3D Tiles
  • Invert classification
  • Vector tiles
  • Multifrustum

@lilleyse lilleyse requested a review from IanLilleyT May 19, 2020 04:14
@cesium-concierge
Copy link

Thanks for the pull request @lilleyse!

  • ✔️ Signed CLA found.
  • ❔ 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.

Base automatically changed from orthoGroundPrimitiveFix to master May 19, 2020 20:44
@lilleyse
Copy link
Contributor Author

I'm seeing an improvement from 32 fps to 42 fps on the vector tile classification sandcastle: link

Screen Shot 2020-05-19 at 9 16 03 PM

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! I tested everything myself with multi-frustum and orthographic and couldn't find any problems. The performance boost is great!

@IanLilleyT IanLilleyT merged commit 9eaf6a8 into master May 20, 2020
@IanLilleyT IanLilleyT deleted the two-pass-classification branch May 20, 2020 01:52
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.

3 participants