Methods
static Cesium.PostProcessStageLibrary.createBlackAndWhiteStage() → PostProcessStage
此阶段有一个 uniform 值 gradations,用于缩放每个像素的亮度。
Returns:
static Cesium.PostProcessStageLibrary.createBlurStage() → PostProcessStageComposite
此阶段具有以下 uniforms:delta、sigma 和 stepSize。
delta 和 sigma 用于计算高斯滤波器的权重。公式为 exp((-0.5 * delta * delta) / (sigma * sigma))。
delta 的默认值为 1.0。sigma 的默认值为 2.0。
stepSize 是到下一个纹素的距离。默认值为 1.0。
Returns:
static Cesium.PostProcessStageLibrary.createBrightnessStage() → PostProcessStage
此阶段有一个 uniform 值 brightness,用于缩放每个像素的饱和度。
Returns:
static Cesium.PostProcessStageLibrary.createDepthOfFieldStage() → PostProcessStageComposite
景深模拟相机对焦。场景中处于对焦状态的物体 会很清晰,而未对焦的物体会被模糊。
此阶段具有以下 uniforms:focalDistance、delta、sigma 和 stepSize。
focalDistance 是从相机到对焦点的距离(米)。
delta、sigma 和 stepSize 与 PostProcessStageLibrary#createBlurStage 中的属性相同。
模糊会应用于失焦区域。
Returns:
static Cesium.PostProcessStageLibrary.createEdgeDetectionStage() → PostProcessStage
当位于边缘上时,将颜色写入输出纹理,并将 alpha 设为 1.0。
此阶段具有以下 uniforms:color 和 length
color是突出显示边缘的颜色。默认值为Color#BLACK。length是边缘的长度(像素)。默认值为0.5。
This stage is not supported in 2D.
Returns:
Example:
// multiple silhouette effects
const yellowEdge = Cesium.PostProcessStageLibrary.createEdgeDetectionStage();
yellowEdge.uniforms.color = Cesium.Color.YELLOW;
yellowEdge.selected = [feature0];
const greenEdge = Cesium.PostProcessStageLibrary.createEdgeDetectionStage();
greenEdge.uniforms.color = Cesium.Color.LIME;
greenEdge.selected = [feature1];
// draw edges around feature0 and feature1
postProcessStages.add(Cesium.PostProcessStageLibrary.createSilhouetteStage([yellowEdge, greenEdge]);
static Cesium.PostProcessStageLibrary.createLensFlareStage() → PostProcessStage
此阶段具有以下 uniforms:dirtTexture、starTexture、intensity、distortion、ghostDispersal、
haloWidth、dirtAmount 和 earthRadius。
dirtTexture是用于模拟镜头上灰尘的纹理。starTexture是用于镜头眩光星型图案的纹理。intensity是一个标量,乘以镜头眩光的结果。默认值为2.0。distortion是一个影响色差效果畸变的标量值。默认值为10.0。ghostDispersal是一个标量,表示光晕效果距离纹理中心的距离。默认值为0.4。haloWidth是一个标量,表示从光晕扩散出的光晕宽度。默认值为0.4。dirtAmount是一个标量,表示镜头上灰尘的数量。默认值为0.4。earthRadius是地球的最大半径。默认值为Ellipsoid.WGS84.maximumRadius。
Returns:
static Cesium.PostProcessStageLibrary.createNightVisionStage() → PostProcessStage
Returns:
static Cesium.PostProcessStageLibrary.createSilhouetteStage(edgeDetectionStages) → PostProcessStageComposite
轮廓效果将边缘检测过程的颜色与输入颜色纹理进行合成。
当 edgeDetectionStages 为 undefined 时,此阶段具有以下 uniforms:color 和 length
color 是突出显示边缘的颜色。默认值为 Color#BLACK。
length 是边缘的长度(像素)。默认值为 0.5。
| Name | Type | Description |
|---|---|---|
edgeDetectionStages |
Array.<PostProcessStage> | optional 边缘检测后处理阶段的数组。 |
Returns:
此阶段需要 WEBGL_depth_texture 扩展。
| Name | Type | Description |
|---|---|---|
scene |
Scene | 场景。 |
Returns:
此阶段需要 WEBGL_depth_texture 扩展。
| Name | Type | Description |
|---|---|---|
scene |
Scene | 场景。 |
Returns:
此阶段需要 WEBGL_depth_texture 扩展。
| Name | Type | Description |
|---|---|---|
scene |
Scene | 场景。 |
Returns:
此阶段需要 WEBGL_depth_texture 扩展。
| Name | Type | Description |
|---|---|---|
scene |
Scene | 场景。 |
