new Cesium.PostProcessStageCollection()

A collection of PostProcessStages and/or PostProcessStageComposites.

每个后处理阶段的输入纹理是场景给的纹理或纹理 到收藏的前一阶段.

如果环境隔离或开花阶段被启用,它们将在所有其他阶段之前执行.

If the FXAA stage is enabled, it will execute after all other stages.

Members

readonly ambientOcclusion : PostProcessStageComposite

一个将基于 Horizon 的 Ambient Occulation ( HBAO ) 应用到输入纹理的后处理阶段.

环境隐蔽模拟环境光的阴影. 这些阴影永远存在 当.. 表面接收光线 无论光线的位置如何.

这些制服具有以下特性:

  • intensity is a scalar value used to lighten or darken the shadows exponentially. Higher values make the shadows darker. The default value is 3.0.
  • bias is a scalar value representing an angle in radians. If the dot product between the normal of the sample and the vector to the camera is less than this value, 取样停止在当前方向。 这个用来去除靠近平原边缘的阴影. 默认值为 NT 0 0.1 NT 1 . NT 2
  • lengthCap is a scalar value representing a length in meters. If the distance from the current sample to first sample is greater than this value, 采样停止在当前方向. 默认值为 NT 0 0.26 NT 1 . NT 2
  • directionCount is the number of directions along which the ray marching will search for occluders. The default value is 8.
  • stepCount is the number of steps the ray marching will take along each direction. The default value is 32.
  • randomTexture is a texture where the red channel is a random value in [0.0, 1.0]. The default value is undefined. This texture needs to be set.
  • ambientOcclusionOnly is a boolean value. When true, only the shadows generated are written to the output. When false, the input texture is modulated 与环境隔离。 这是一个有用的调试选项, 用于查看更改统一值的效果 。 默认值为 NT % 3

启用时, 此阶段将先执行 .

readonly bloom : PostProcessStageComposite

开花效果的后处理阶段.

开花效应会增加发光效应,使明亮区域变亮,暗色区域变暗.

这一阶段的军服如下: contrast , brainess , glow Only , , delta, sigma, and stepSize.

  • contrast is a scalar value in the range [-255.0, 255.0] and affects the contract of the effect. The default value is 128.0.
  • brightness is a scalar value. The input texture RGB value is converted to hue, saturation, and brightness (HSB) then this value is 增诸光明. 默认值为 NT 0 -0.3 NT 1 . NT 2
  • glowOnly is a boolean value. When true, only the glow effect will be shown. When false, the glow will be added to the input texture. The default value is false. This is a debug option for viewing the effects when changing the other uniform values.

delta, sigma, and stepSize are the same properties as PostProcessStageLibrary#createBlurStage. 模糊度被应用到图像产生的阴影上,使其更加平滑.

启用时, 此阶段将先执行 .

exposure : number

Control the exposure when HDR is on. Less than 1.0 makes the tonemapping darker while greater than 1.0 makes it brighter.
Default Value: 1.0
Example:
viewer.scene.postProcessStages.exposure = 1.0;

readonly fxaa : PostProcessStage

快速近似反异化的后处理阶段.

启用时, 此阶段将执行 .

readonly length : number

此集合的后处理阶段数 .

readonly ready : boolean

确定收藏中的所有后处理阶段是否准备执行.

tonemapper : Tonemapper

指定高动态范围渲染时使用的调色图算法. Sandcastle Demo
Default Value: Tonemapper.PBR_NEUTRAL
Example:
viewer.scene.postProcessStages.tonemapper = Cesium.Tonemapper.ACES;

Methods

将后处理阶段添加到收藏中.
Name Type Description
stage PostProcessStage | PostProcessStageComposite 后处理阶段加入到集合中.
Returns:
收藏中加入的后处理阶段.
Throws:
  • DeveloperError : The post-process stage has already been added to the collection or does not have a unique name.

contains(stage)boolean

返回收藏是否包含后处理阶段.
Name Type Description
stage PostProcessStage | PostProcessStageComposite 过程后阶段.
Returns:
收藏是否包含后处理阶段 .

destroy()

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic 释放 WebGL 资源,而不是依赖垃圾收集器来摧毁此对象.

Once an object is destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception. Therefore, assign the return value (undefined) to the object as done in the example.

Throws:
  • DeveloperError : This object was destroyed, i.e., destroy() was called.
See:
在 NT 0 index NT 1 获得后处理阶段.
Name Type Description
index number 后处理阶段的索引.
Returns:
索引的后处理阶段.

isDestroyed()boolean

如果此对象被销毁, 返回真实; 否则, 错误 .

If this object was destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception.

Returns:
true if this object was destroyed; otherwise, false.
See:

remove(stage)boolean

从收藏中删除后处理阶段并销毁它.
Name Type Description
stage PostProcessStage | PostProcessStageComposite 从收藏中删除的后处理阶段.
Returns:
进程后阶段是否被删除 .

removeAll()

从收藏中删除所有后处理阶段并销毁它们.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.