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

Polylines not displayed correctly at long zoom distance on iOS #9035

Closed
sparsematrix opened this issue Jul 17, 2020 · 16 comments
Closed

Polylines not displayed correctly at long zoom distance on iOS #9035

sparsematrix opened this issue Jul 17, 2020 · 16 comments

Comments

@sparsematrix
Copy link

I have seen this in my app which uses WKWebView and also with the default Materials example when loaded in iOS Safari.

  1. Navigate to the default sandcastle example (https://sandcastle.cesium.com/?src=Materials.html) in Safari on iOS 13.5.1 or 13.4 (perhaps others).
  2. From the "Polyline materials" selection, choose "Polyline Outline".
  3. Observe that the polyline is just a large blocky red line. It is not a while line with red outline as it should be.
  4. Select any of the other 2 polyline types.
  5. Observe that the lines cannot be seen at all.
  6. Re-select "Polyline Outline".
  7. Zoom in tightly on the giant red polyline. At sufficient zoom you will notice that it does correctly render as white with red outline.
  8. Switch to either of the other 2 choices and notice that you can now see the polyline at this tighter zoom. If you zoom out the line will disappear.

Sandcastle example: https://sandcastle.cesium.com/?src=Materials.html

Browser: iOS Safari

Operating System: iOS 13.4 and 13.5.1

@OmarShehata
Copy link
Contributor

Is this related to or the same as #6735 @likangning93 ?

@sparsematrix
Copy link
Author

I should probably add that I am using 1.67 currently as it does not present this issue. One of my colleagues reported to me that it was the latest he found that still worked.

@OmarShehata
Copy link
Contributor

@sparsematrix that information helps a lot. If you're able to do a git bisect to determine exactly which commit caused this issue, that'd help narrowing it down. That's what I would do next.

@dzungpng
Copy link
Contributor

Closing this issue as we have not heard from the original poster in a while and do not have sufficient information to move forward. Please feel free to re-open it to continue the discussion if necessary.

@sparsematrix
Copy link
Author

You have sufficient information. I apologize that I have a greater than full time job and have not yet had time to perform a binary search on commits and determine which one broke it. Your sandcastle example is literally broken. You should need no more information than that.

@sparsematrix
Copy link
Author

Re-opened as #9232

@dzungpng
Copy link
Contributor

@sparsematrix My apologies. I see that we have already confirmed that this is a bug. Re-opening issue to continue the discussion.

@sparsematrix
Copy link
Author

Here is the result of my git bisect testing:
c5ac455 is the first bad commit
commit c5ac455
Author: Kevin Ring [email protected]
Date: Tue Mar 31 15:12:03 2020 +1100

Fix texture coordinates everywhere instead of in just the one place.

Source/Shaders/Materials/PolylineArrowMaterial.glsl | 1 -
Source/Shaders/PolylineFS.glsl | 10 ++++++----
Source/Shaders/PolylineVS.glsl | 4 +++-

@hpinkos
Copy link
Contributor

hpinkos commented Mar 17, 2021

Thanks for taking the time to look further into this @sparsematrix

@kring any ideas?

@kring
Copy link
Member

kring commented Mar 17, 2021

Not much @sparsematrix and @hpinkos. That commit was part of a major rework of polyline rendering with the log depth buffer, which fixed a bunch of problems. Since it seems to be working on other platforms (certainly various desktop platforms and on the Android devices I've tried), it could indicate an iOS bug, or it could indicate we're doing something dodgy that other platforms just happen to let us get away with. But nothing jumps out at me as far as the latter, and I don't have an iOS device to debug it on.

One thing to try: disable the logarithmic depth buffer and see if that helps. Here's a version of the Materials Sandcastle with log depth disabled.

@kring
Copy link
Member

kring commented Mar 17, 2021

Here's the PR that commit was part of:
#8706

@sparsematrix
Copy link
Author

One thing to try: disable the logarithmic depth buffer and see if that helps. Here's a version of the Materials Sandcastle with log depth disabled.

@kring Thanks for taking a look. I've given that version a shot on an iPad and it shows the same issue as the regular Materials Sandcastle.

@sparsematrix
Copy link
Author

@kring not sure if any of this helps...

Here's how it looks in 1.67 in my app. To get this display there is a PolylineOutline drawn and then a PolylineArrow drawn along the same path to get the appearance of both outline and arrows. The line color is magenta and the outline is black:
cesium_1 67

Moving to commit d631c21, which is just before the breaking commit. The outline issue is not present but PolylineArrow no longer draws at all in iOS (still works in Chrome) regardless of zoom level:
at_d631c21_arrows_broken

Moving to the breaking commit c5ac455. When zoomed out I only see the outline color. Zooming in tight at this commit results in the correct appearance of both the outline and arrow (seemingly fixing the arrow issue seen in d631c21):
at_c5ac455

Screen Shot 2021-03-18 at 10 06 58 AM

I have updated one of my iPads to the latest iOS (14.4.1) and confirmed that it is still an issue there with the Sandcastle example.

@sparsematrix
Copy link
Author

I have confirmed that this issue remains in iOS 14.5.1

@sparsematrix
Copy link
Author

Updated to iOS 15.4.1 and Cesium 1.92.

Here's my latest results in Safari/WKWebView:

@sparsematrix
Copy link
Author

Remaining issues appear to be covered by #9827 and setting orderIndependentTranslucency to false does appear to resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants