Display Priority of Imagery und 3d-Tileset Layers

Hi all
I am doing some test with the actual 3d-tiles branch (all Browsers).
In my application, I use my own terrain-provider, my own imagery provider and a 3d-tileset layer with buildungs.
I encountered a issue with Cesium, where I did not find a solution until now.
I have a Terrain layer (layer provider is swisstopo) a orthoimagery from a WMTS and a 3d-tiles layer with buildings.
Since we live in the mountains, terrain models are quite important for visualisation.
Now I have the problem, that the buildings (3d-tiles) seem to have always first display priority, although they are sometimes behind hills und should not be seen at all (masked by the terrain-layer and ortho-layer).
Here's a snapshopt of the buildings floating in the air, although they are behind the hills. http://geodaten.llv.li/temp/snapshot.PNG
Is there a way in Cesium to define the priority of layers (vector and imagery)? I did not find a hint in the documentation.

Help would be welcome.

Peter Jehle

Hi Peter,

Try setting:

viewer.scene.globe.depthTestAgainstTerrain = true;

See the reference doc:


And also this issue for future work: