How to reduce polygon artifacts and flickering

Hi there,

I am using CesiumJS to load a geojson datasource comprised of polygon features that represent roads and sidewalks. Although my geojson features have nice smooth border edges forming a curve, when rendered with CesiumJS, they look like this:

Not only that but the edges flicker greatly as the camera pans and orbits. Is this a limitation of the engine? Is there a way to improve the visual appearance? Or is CesiumJS limited when rendering smaller scale polygon entities like this?

It does not appear to be a z-fighting issue as the appearance will be the same even if I raise a polygon far above the other. I have tried some AI suggestions but nothing has worked yet.

Ideally, it should look more like this:

Thank you

Hi @mind.sight.studios! Would it be possible to share a Sandcastle demo, or perhaps part of the GeoJSON, for us to reproduce this? I have a hunch that this is related to numerical precision in the GeoJSON loader, but would like to confirm that. Vector data like GeoJSON is an area where we’re actively working to improve performance and quality in the coming months.

Thanks for the quick reply.

Our team has just discovered that the artifacts and flickering are only present when we have Chrome graphics acceleration turned on. Unfortunately, when we turn it off, the viewport becomes much less responsive.

Note that my team is running on Lenovo X1 Carbon laptops with basic integrated Intel Graphics.

One of my team members uses a Lenovo X1 with Intel(R) Iris(R) Xe Graphics and he does not get the artifacts regardless of his Chrome graphics acceleration setting.

So the issue seems to be GPU dependent. Let me know if you have any suggestions knowing this new information. If you still want an example geosjon file, let me know and I’ll get one for you straight away.

I think that information further suggests this is a numerical precision issue. It is expected that different GPUs have different levels of precision available, but not (I think…) that these precision differences would be so visible on a scale of meters with typical usage of GeoJsonDataSource. A Sandcastle or an example of the GeoJSON would be helpful if that’s possible to share, yes, thanks!

A screenshot of https://webglreport.com/ from both laptops (with graphics acceleration on) may also be helpful, but less so than the reproduction info.

There had been some issues in a similar context with a similar GPU, described in Polyline Jitter on Intel Arc (zizgags) . Maybe that’s a red herring, but just to rule that out, very broadly: This should have been fixed a while ago, with https://github.com/CesiumGS/cesium/pull/13107 . Can you confirm that you are using a ‘somewhat recent’ CesiumJS version that includes this fix?

Thank you - I updated to the latest public version and the issue remains. Perhaps it is slightly improved but generally still very bad. I need to do a side-by-side comparison to be sure.

Thanks for checking that, as @donmccurdy suggested, if you could provide a sandcastle and/or an example geoJson file that would be really helpful. Also the screenshot of webglreport.com from both laptops (with graphics acceleration on) could help.

This would all go a long way to use being able to help/resolve the issue!