Entities and terrain occlusion

Hi all,

I’m tinkering with Cesium and I tried to add a simple point entity to a terrain example in Arctic DEM, it seems that my entity point is not occluded by terrain. Is this normal?

This is how I add my entity point:

viewer.terrainProvider = cesiumTerrainProviderMeshes;

var simplePoint = viewer.entities.add({
name : ‘Simple Point’,
position : Cesium.Cartesian3.fromRadians(-2.6399828792482234, 1.0993550795541742, 5795),
point : {
pixelSize : 15,
color : Cesium.Color.RED,
heightReference : Cesium.HeightReference.CLAMP_TO_GROUND
label : {
text : ‘Denali Mt’,
font : ‘20pt arial’,
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
outlineWidth : 1,
verticalOrigin : Cesium.VerticalOrigin.BOTTOM,
pixelOffset : new Cesium.Cartesian2(0, -9)


Tried to add disableDepthTestDistance params to label and point, nothing changed

I’m using Cesium latest version, tried thsi on Sand castle in Chrome and Win 7.

Thanks in advance,


Hi there,

Have you tried enabling the depth test? You can do so with this line:

viewer.scene.globe.depthTestAgainstTerrain = true;


Hope that helps,

  • Rachel
1 Like

That’s it! Thanks Rachel!

Rachel, you are a star. One line of code to solve what I have been looking at for days!