density
A scalar that determines the density of the fog. Terrain that is in full fog are culled. The density of the fog increases as this number approaches 1.0 and becomes less dense as it approaches zero. The more dense the fog is, the more aggressively the terrain is culled. For example, if the camera is a height of 1000.0m above the ellipsoid, increasing the value to 3.0e-3 will cause many tiles close to the viewer be culled. Decreasing the value will push the fog further from the viewer, but decrease performance as more of the terrain is rendered.
// Double the default fog density
viewer.scene.fog.density = 0.0012;
Content copied to clipboard