Properties for managing image-based lighting on tilesets and models.
Also manages the necessary resources and textures.
If specular environment maps are used, ImageBasedLighting#destroy
must be called
when the image-based lighting is no longer needed to clean up GPU resources properly.
If a model or tileset creates an instance of ImageBasedLighting, it will handle this.
Otherwise, the application is responsible for calling destroy().
参数名称 | 类型 | 默认值 | 描述信息 |
---|---|---|---|
options.imageBasedLightingFactor |
Cartesian2 |
Cartesian2(1.0, 1.0)
|
可选 Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox. |
options.sphericalHarmonicCoefficients |
Array.<Cartesian3> | 可选 The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. | |
options.specularEnvironmentMaps |
string | 可选 A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps. |
成员(属性)
imageBasedLightingFactor : Cartesian2
Cesium adds lighting from the earth, sky, atmosphere, and star skybox.
This cartesian is used to scale the final diffuse and specular lighting
contribution from those sources to the final color. A value of 0.0 will
disable those light sources.
-
默认值:
Cartesian2(1.0, 1.0)
A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
sphericalHarmonicCoefficients : Array.<Cartesian3>
The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When
undefined
, a diffuse irradiance
computed from the atmosphere color is used.
There are nine Cartesian3
coefficients.
The order of the coefficients is: L0,0, L1,-1, L1,0, L1,1, L2,-2, L2,-1, L2,0, L2,1, L2,2
cmgen
tool of
Google's Filament project.
Be sure to use the --no-mirror
option in cmgen
.