-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Polygon rendering issue #10906
Comments
Thanks for the in-depth report @daniel-sheward! I'm unable to reproduce in Chrome on MacOS with an Intel chip.
I think this may be the culprit. We've seen some other issues arise on M1 Macs. I think the underlying culprit here is this precision issue specific to machines with M1 chips. |
Hi @ggetz, while we are also experiencing the jittering issue, I think this might be a seperate issue.
We have observed the same, so the issue does seem to be related to the M1. Running Chrome with the following:
Resolves the jittery issue when testing with https://prideout.net/emulating-double-precision and the sandbox you posted however it does not resolve the rendering issue. The logarithmicDepthBuffer workaround resolves the rendering issue but does not work for the jittering issue. A bit of research into previous tickets has shown this workaround being suggested two years ago for a similar issue: Which also references this PR: #9108 I've done some screen recordings to hopefully make the issue easier to see: Tilting: Screen.Recording.2022-11-17.at.10.14.42.am.movZooming: Screen.Recording.2022-11-17.at.10.06.49.am.movI don't think this polygon jitters like what you see with the lines reported in that issue. I have also seen a similar issue reported from many years ago: The issue only appears to occur at a distance from the polygon. Zoom in far enough and the issue stops occurring whereas the jitter issue gets significantly worse as you zoom in. It also only appears to occur in that area of the map. Creating polygons in Australia works without issues for example. |
Thanks for digging further @daniel-sheward. This may be a long shot, but would you be able to try this version of your Sandcastle which uses a WebGL 2 context? |
Hi @ggetz, Unfortunately the issue still occurs with the sandbox that you linked. I'm happy to keep trying various things out on my M1 if you can think of anything else. In the meantime, for our product I'm planning on setting logarithmicDepthBuffer to false as it appears to have have zero impact on non-M1 devices while fixing this issue. I'm not really sure if there are any downsides to this. If there's no downsides to setting logarithmicDepthBuffer to false, then would the solution to this just be removing whatever code relates to this, effectively making it disabled everywhere? From what I can tell it's only used to decide between these two values in Scene.js but I could be very wrong: this.farToNearRatio = 1000.0;
this.logarithmicDepthFarToNearRatio = 1e9; https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Scene/Scene.js#L333 I think I might set up a test environment tomorrow and see if I can play around with removing some of this code to see what happens. |
Hi @ggetz, this seems to have been fixed since I posted this issue. I can't reproduce it using any of the links. Thanks for your help. |
Sandcastle example:
https://sandcastle.cesium.com/#c=pZJLT+MwEMe/ipVTKmWdxkna9EEFKntDYlXQXggHk0xbC8euxk5RWPHdcR7V7gI94Zc8M//faORxoZWx5CjgBZBcEAUvZA1G1BX93fn83Cs6e62V5UIB5t5okatcFR2JUP7Sstlp5eg+DQVlhRVgKC9L/0+uCFG8gjnJvQ2U5DDI3TI1bnkBuRe0oiEwJx1CyF4Aciz2zfxU0pqjdTeuYrpFXV3DDgHMFSJv/IceOo3/rXZEkxllLEvGSZqx4HP8R5LQKUsZm01nk+AMn4wn8STL0nN8NGbjKJqe5dM4yqKEneVZEqVZHE+Db9bfhx9Hg67iFlBw+fcltdRINz+vO8GbO9/6rrZzaOOr1tW99j80dbQgXuDl3qIFT5uQpbGNhNWprEtRHTRaUqP0KQ0tVAfpajDhU108g6WFMaPFQIb/ostSHIkoL774dqSQ3BgX2dZS3olX929Wy9DpP6FS81Ko3e0RUPKmle2j1U3vpJQuQ2d+TVqt5RPHD5nfAQ
Browser:
Chrome Version 107.0.5304.110 (Official Build) (arm64)
Operating System:
macOS Monterey 12.5 (21G72)
WebGL Report
WebGL 1
WebGL 1 Supported Extensions
WebGL 2
WebGL 2 Supported Extensions
Steps to reproduce:
Screenshots:
Workaround:
Add the following code to the sandbox:
The text was updated successfully, but these errors were encountered: