用于管理图块集和模型上基于图像的照明的属性。还管理必要的资源和纹理。 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 当不再需要基于图像的光照时必须调用以正确清理 GPU 资源。如果模型或图块集创建 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().
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
options.imageBasedLightingFactor |
Cartesian2 |
Cartesian2(1.0, 1.0)
|
可选 optional 缩放来自地球、天空、大气层和恒星天空盒的基于漫反射和镜面反射图像的照明。 Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox. |
options.sphericalHarmonicCoefficients |
Array.<Cartesian3> | 可选 optional 用于基于图像的照明的漫射颜色的三阶球谐系数。 The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. | |
options.specularEnvironmentMaps |
string | 可选 optional KTX2 文件的 URL,其中包含镜面反射照明的立方体贴图和卷积镜面 mipmap。 A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps. |
成员 Members
imageBasedLightingFactor : Cartesian2
Cesium 添加了来自地球、天空、大气层和恒星天空盒的照明。该笛卡尔用于将这些光源的最终漫反射和镜面反射照明贡献缩放到最终颜色。值为 0.0 将禁用这些光源。 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.
-
默认值: Default Value:
Cartesian2(1.0, 1.0)
KTX2 文件的 URL,其中包含镜面反射照明的立方体贴图和卷积镜面 mipmap。 A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
演示: Demo:
另见: See:
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 系数。系数的顺序为:L coefficients. The order of the coefficients is: L0,0,L , L1,-1,L , L1,0,L , L1,1,L , L2,-2,L , L2,-1,L , L2,0,L , L2,1,L , L2,2
cmgen 的工具 tool of
Google's Filament project。 Be sure to use the . Be sure to use the --no-mirror 选项中 option in cmgen.
