包含创建共同后处理阶段的函数.

Methods

static Cesium.PostProcessStageLibrary.createBlackAndWhiteStage()PostProcessStage

创建一个进程后阶段,使输入纹理具有黑白分级.

此阶段有一个统一的值,为 等级 ,其尺度为每个像素的亮度.

Returns:
使输入纹理具有黑白分级的后处理阶段.

static Cesium.PostProcessStageLibrary.createBlurStage()PostProcessStageComposite

创建一个进程后阶段,将高斯模糊度应用到输入纹理中。 这个阶段通常与另一个阶段一起应用.

这一阶段的制服如下: Delta , Sigma , Size .

NT#0 德尔塔 NT 1 和 NT 2 sigma NT 3 用于计算高斯滤波器的重量. 方程式为 exp((-0.5 * delta * delta)/(sigma * sigma)) . The default value for delta is 1.0. The default value for sigma is 2.0. 步Size 是下一个texel的距离. 默认为 NT 2 1.0 NT 3 .

Returns:
在输入纹理上应用高斯模糊的后处理阶段.

static Cesium.PostProcessStageLibrary.createBrightnessStage()PostProcessStage

创建一个饱和输入纹理的后处理阶段.

此阶段有一个一致的值,即 NT 0 braightness NT 1 ,这个值可以衡量每个像素的饱和度.

Returns:
一个饱和输入纹理的后处理阶段.

static Cesium.PostProcessStageLibrary.createDepthOfFieldStage()PostProcessStageComposite

创建应用字段效果深度的后处理阶段.

场深度模拟相机焦点. 场景中聚焦的对象 将清晰,而不聚焦的物体将模糊.

This stage has the following uniforms: focalDistance, delta, sigma, and stepSize.

~~焦Distance ~是相机距离米的距离,以设定相机焦点.

delta, sigma, and stepSize are the same properties as PostProcessStageLibrary#createBlurStage. 模糊性被应用到那些重点不突出的领域.

Returns:
应用深度场效应的后处理阶段.

static Cesium.PostProcessStageLibrary.createEdgeDetectionStage()PostProcessStage

创建检测边缘的后处理阶段.

将颜色写入输出纹理中, 当它处于边缘时, 将 alpha 设置为 1.0 .

这一阶段的制服如下: NT 0 color NT 1 和 NT 2 长 NT 3

  • color is the color of the highlighted edge. The default is Color#BLACK.
  • length is the length of the edges in pixels. The default is 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

创建一个应用模拟光线发光镜头的效果的后处理阶段.

这一阶段的制服如下: NT 0 DirtTexture NT 1 , NT 2 StarTexture NT 3 , NT 4 强度 NT 5 , NT 6 扭曲 NT 7 , NT 8 鬼驱 NT 9 ,....., haloWidth, dirtAmount, and earthRadius.

  • dirtTexture is a texture sampled to simulate dirt on the lens.
  • starTexture is the texture sampled for the star pattern of the flare.
  • intensity is a scalar multiplied by the result of the lens flare. The default value is 2.0.
  • distortion is a scalar value that affects the chromatic effect distortion. The default value is 10.0.
  • ghostDispersal is a scalar indicating how far the halo effect is from the center of the texture. The default value is 0.4.
  • haloWidth is a scalar representing the width of the halo from the ghost dispersal. The default value is 0.4.
  • dirtAmount is a scalar representing the amount of dirt on the lens. The default value is 0.4.
  • earthRadius is the maximum radius of the earth. The default value is Ellipsoid.WGS84.maximumRadius.

Returns:
应用镜头耀斑效果的后处理阶段.

static Cesium.PostProcessStageLibrary.createNightVisionStage()PostProcessStage

创建后处理阶段,为输入纹理添加夜视效果.
Returns:
后处理阶段,为输入纹理添加夜视效果.

static Cesium.PostProcessStageLibrary.createSilhouetteStage(edgeDetectionStages)PostProcessStageComposite

创建应用 silhouette 效果的后处理阶段.

硅胶效果复合剂从边缘检测到的颜色,带有输入色纹理.

当 NT 0 对接检测 NT 1 为 NT 2 未定义 NT 3 时,此阶段的制服如下: NT 4 color NT 5 和 国 度 6 国 度

color 是突出边的颜色. 默认值为 Color#BLACK . 是像素中边缘的长度. 默认值为 NT 2 0.5 NT 3 .

Name Type Description
edgeDetectionStages Array.<PostProcessStage> optional 一系列边缘检测后处理阶段.
Returns:
应用 silhouette 效果的后处理阶段.

static Cesium.PostProcessStageLibrary.isAmbientOcclusionSupported(scene)boolean

是否支持环境隔离阶段.

这个阶段需要WEBGL 深度 纹理扩展.

Name Type Description
scene Scene The scene.
Returns:
是否支持此员额进程阶段 .
See:

static Cesium.PostProcessStageLibrary.isDepthOfFieldSupported(scene)boolean

是否支持一个深度的实地阶段 .

这个阶段需要WEBGL 深度 纹理扩展.

Name Type Description
scene Scene The scene.
Returns:
是否支持此员额进程阶段 .
See:

static Cesium.PostProcessStageLibrary.isEdgeDetectionSupported(scene)boolean

是否支持边缘检测阶段 .

这个阶段需要WEBGL 深度 纹理扩展.

Name Type Description
scene Scene The scene.
Returns:
是否支持此员额进程阶段 .
See:

static Cesium.PostProcessStageLibrary.isSilhouetteSupported(scene)boolean

是否支持一个 silhouette 阶段 .

这个阶段需要WEBGL 深度 纹理扩展.

Name Type Description
scene Scene The scene.
Returns:
是否支持此员额进程阶段 .
See:
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.