Atmosphere

new Cesium.Atmosphere()

3D Tiles 和模型用于渲染天空大气、地面大气和雾的共同大气设置。

不要将此类与 SkyAtmosphere 混淆,后者负责渲染天空。

虽然大气设置会影响雾的颜色,但请参阅 Fog 以控制雾的渲染方式。

Examples:
// 使用太阳方向开启动态大气光照
scene.atmosphere.dynamicLighting = Cesium.DynamicAtmosphereLightingType.SUNLIGHT;
// 使用场景中的任何光源开启动态光照
scene.light = new Cesium.DirectionalLight({
  direction: new Cesium.Cartesian3(1, 0, 0)
});
scene.atmosphere.dynamicLighting = Cesium.DynamicAtmosphereLightingType.SCENE_LIGHT;
// 调整大气效果的颜色。
scene.atmosphere.hueShift = 0.4; // 在色轮上循环 40%
scene.atmosphere.brightnessShift = 0.25; // 增加亮度
scene.atmosphere.saturationShift = -0.1; // 降低颜色饱和度
See:

Members

brightnessShift : number

应用于大气的亮度偏移。默认为 0.0(无偏移)。 亮度偏移 -1.0 表示完全黑暗,这将让太空显示出来。
Default Value: 0.0
当不为 DynamicAtmosphereLightingType.NONE 时,所选光源将用于动态照亮所有与大气相关的渲染效果。
Default Value: DynamicAtmosphereLightingType.NONE
应用于大气的色相偏移。默认为 0.0(无偏移)。 色相偏移 1.0 表示可用色相的完整旋转。
Default Value: 0.0

lightIntensity : number

用于计算地面大气颜色的光照强度。
Default Value: 10.0

mieAnisotropy : number

用于米氏散射的介质各向异性。

有效值介于 -1.0 和 1.0 之间。

Default Value: 0.9
用于地面大气大气散射方程中的米氏散射系数。
Default Value: Cartesian3(21e-6, 21e-6, 21e-6)

mieScaleHeight : number

用于地面大气大气散射方程中的米氏标高,单位为米。
Default Value: 3200.0
用于地面大气大气散射方程中的瑞利散射系数。
Default Value: Cartesian3(5.5e-6, 13.0e-6, 28.4e-6)

rayleighScaleHeight : number

用于地面大气大气散射方程中的瑞利标高,单位为米。
Default Value: 10000.0

saturationShift : number

应用于大气的饱和度偏移。默认为 0.0(无偏移)。 饱和度偏移 -1.0 表示单色。
Default Value: 0.0

Methods

static Cesium.Atmosphere.requiresColorCorrect(atmosphere)boolean

如果大气着色器需要颜色校正步骤,则返回 true
Name Type Description
atmosphere Atmosphere 要检查的大气实例
Returns:
如果大气着色器需要颜色校正步骤则返回 true
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.