Parts of clamped polygons disappear as camera moves when using 3D tiles

Hi! I’m running into an issue where portions of polygons clamped to 3D tiles appear and disappear as the camera moves. It has the visual effect of masking part of the layer. It seems to happen more often in specific areas of terrain and with polygons of all types. A sandcastle demonstrating the issue is linked below as well as images of the issue. You can move the camera from side to side to see parts of the polygon over the road disappear and reappear. Any help would be much appreciated. Thanks!



Hi there,

I notice that I’m able to reproduce this on iOS devices with an M1 chip, but not MacOS with an Intel chip. There are a few possible issues with WebGL on M1/M2 chips that may be manifesting here.

In particular this issue is likely the culprit. We think this is related to a bug in webkit (see discussion in 237434 – Precision issue in in Vertex Shader on iPads/M1 (but work on Intel Mac)), and have seen reports that it is fixed in Chrome Canary, meaning a fix may be officially released for Chrome soon.

What browser(s) are you seeing issues with? And are you using a machine with an M1 or M2 chip?

1 Like

Hi, thanks for the reply! Currently seeing this in both Safari and Chrome 117.0.5938.92 on an M1 MacBook pro and on iOS safari on an iPhone 12 mini. It seems to work fine in Chrome on an Intel MacBook.

Any other suggestions for drawing large terrain-clamped polygons? Unfortunately a large share of our audience will probably be using devices that this breaks on and we can’t wait for Chrome to release a fix. I tried pre-calculating elevation for each point on the shape but the ground in the middle of the shape still pokes through. Thanks!

I tried pre-calculating elevation for each point on the shape but the ground in the middle of the shape still pokes through. Thanks!

Here’s a possible workaround: Sandcastle.

It renders each position at terrain height, and disables depthTestAgainstTerrain which keep the ground from clipping through in between.