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

Specify highp sampler2D for clipping plane textures to improve reliability on some devices #9060

Merged
merged 2 commits into from
Jul 24, 2020

Conversation

likangning93
Copy link
Contributor

Fixes #9023.

Some devices with Mali GPUs (mostly Android, but also seen on some Chromebooks) were having trouble with clipping plane reliability, apparently due to precision problems. As observed in #8311, WebGL implementations are free to use lower precision sampling if the precision isn't specified, so this PR explicitly specifies highp on texture sampling for clipping planes. This seems to help on the devices in the issue above.

I also tested Model, pnts, b3dm, i3dm, and Globe clipping planes with these changes on Chrome and Firefox in Linux and on Internet Explorer and Chrome in Windows, both using float textures where supported and using Cesium.ClippingPlaneCollection.useFloatTexture = function() { return false; }; to force the uint8 RGBA codepath, and it looks like this doesn't cause problems there.

@lilleyse can you test in Safari on macos?

@likangning93 likangning93 requested a review from lilleyse July 24, 2020 16:24
@cesium-concierge
Copy link

Thanks for the pull request @likangning93!

  • ✔️ 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.

@lilleyse
Copy link
Contributor

Works in Safari on my 2015 Macbook with AMD card.

I tested Cesium.ClippingPlaneCollection.useFloatTexture = function() { return false; }; as well.

@lilleyse
Copy link
Contributor

Thanks @likangning93!

@lilleyse lilleyse merged commit 67a36c7 into master Jul 24, 2020
@lilleyse lilleyse deleted the highpClippingPlaneTex branch July 24, 2020 16:36
@dennisadams dennisadams mentioned this pull request Jul 27, 2020
5 tasks
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.

Clipping planes weird behavior on certain Android devices
3 participants