Methods
static Cesium.PostProcessStageLibrary.createBlackAndWhiteStage() → PostProcessStage
此阶段有一个统一的值,即 gradations(渐变),用于缩放每个像素的明亮度。
Returns:
static Cesium.PostProcessStageLibrary.createBlurStage() → PostProcessStageComposite
此 stage 具有以下 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
此阶段有一个统一的值 brightness,用于缩放每个像素的饱和度。
Returns:
static Cesium.PostProcessStageLibrary.createDepthOfFieldStage() → PostProcessStageComposite
景深模拟摄像机对焦。场景中的焦点对象 将清晰,而未合焦的物体将变得模糊。
此 stage 具有以下 uniforms:focalDistance、delta、sigma 和 stepSize。
focalDistance 是距摄像机的距离(以米为单位),用于设置摄像机焦点。
delta、sigma 和 stepSize 是与 PostProcessStageLibrary#createBlurStage 相同的属性。
模糊应用于失焦区域。
Returns:
static Cesium.PostProcessStageLibrary.createEdgeDetectionStage() → PostProcessStage
当颜色位于边缘上时,将颜色写入输出纹理,并将 alpha 设置为 1.0。
此阶段有以下制服:颜色和长度
color是高亮显示的边缘的颜色。默认值为Color#BLACK。length是边缘的长度(以像素为单位)。默认值为0.5。
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
此阶段有以下制服:dirtTexture、starTexture、intensity、distortion、ghostDispersal、
haloWidth、dirtAmount 和 earthRadius。
dirtTexture是为模拟镜头上的污垢而采样的纹理。starTexture是为耀斑的星形图案采样的纹理。强度是标量乘以镜头眩光的结果。默认值为2.0。失真是影响半音效果失真的标量值。默认值为10.0。ghostDispersal是一个标量,指示光晕效果与纹理中心的距离。默认值为0.4。haloWidth是一个标量,表示来自虚影扩散的 halo 的宽度。默认值为0.4。dirtAmount是表示镜头上污垢量的标量。默认值为0.4。earthRadius是地球的最大半径。默认值为Ellipsoid.WGS84.maximumRadius。
Returns:
static Cesium.PostProcessStageLibrary.createNightVisionStage() → PostProcessStage
Returns:
static Cesium.PostProcessStageLibrary.createSilhouetteStage(edgeDetectionStages) → PostProcessStageComposite
剪影效果将边缘检测过程中的颜色与输入颜色纹理合成。
当 edgeDetectionStages 未定义时,此 stage 具有以下 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 | 场景。 |
