Clipping Issue with Ion Asset terrain provider

Hi,

I’m not sure if clipping is the right concept but the issue I’m having is that the terrain seems no to clip properly against the polygons I put on top of it. Here is the sandcastle I’ve create to generate the following pictures: link.


and if I replace the terrainProvider by Cesium.Terrain.fromWorldTerrain I obtain the expected behavior:

To create the Ion asset, I’ve uploaded a DEM TIF of the island

Finaly, I’ve figured out the solution

    const viewer = new Cesium.Viewer("cesiumContainer", {
    terrainProvider: new Cesium.Terrain( Cesium.CesiumTerrainProvider.fromIonAssetId(2495988)),
  });

rather then

    const viewer = new Cesium.Viewer("cesiumContainer", {
    terrainProvider: await Cesium.CesiumTerrainProvider.fromIonAssetId(2495988),
  });

I would be interested to better understand the difference between terrain and terrain provider?