Skip to content

KBE3D / KBCore / Cesium / ImageBasedLighting

类: ImageBasedLighting

Properties for managing image-based lighting on tilesets and models. Also manages the necessary resources and textures. <p> 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(). </p>

参数

Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox.

参数

The third order spherical harmonic coefficients used for the diffuse color of image-based lighting.

参数

A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.

属性

imageBasedLightingFactor

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.


sphericalHarmonicCoefficients

sphericalHarmonicCoefficients: Cartesian3[]

The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When <code>undefined</code>, a diffuse irradiance computed from the atmosphere color is used. <p> There are nine <code>Cartesian3</code> coefficients. The order of the coefficients is: L<sub>0,0</sub>, L<sub>1,-1</sub>, L<sub>1,0</sub>, L<sub>1,1</sub>, L<sub>2,-2</sub>, L<sub>2,-1</sub>, L<sub>2,0</sub>, L<sub>2,1</sub>, L<sub>2,2</sub> </p>

These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of Google's Filament project

. Be sure to use the <code>--no-mirror</code> option in <code>cmgen</code>.


specularEnvironmentMaps

specularEnvironmentMaps: string

A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.

构造函数

构造函数

new ImageBasedLighting(): ImageBasedLighting

返回

ImageBasedLighting

KBE3D @3.0.0 Copyright © 2024-present KBE3D