PostProcessStages and/or PostProcessStageComposites.
每个后处理阶段的输入纹理是场景给的纹理或纹理 到收藏的前一阶段.
如果环境隔离或开花阶段被启用,它们将在所有其他阶段之前执行.
If the FXAA stage is enabled, it will execute after all other stages.
Members
readonly ambientOcclusion : PostProcessStageComposite
环境隐蔽模拟环境光的阴影. 这些阴影永远存在 当.. 表面接收光线 无论光线的位置如何.
这些制服具有以下特性:
intensityis a scalar value used to lighten or darken the shadows exponentially. Higher values make the shadows darker. The default value is3.0.biasis 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 2lengthCapis 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 2directionCountis the number of directions along which the ray marching will search for occluders. The default value is8.stepCountis the number of steps the ray marching will take along each direction. The default value is32.randomTextureis a texture where the red channel is a random value in [0.0, 1.0]. The default value isundefined. This texture needs to be set.ambientOcclusionOnlyis a boolean value. Whentrue, only the shadows generated are written to the output. Whenfalse, the input texture is modulated 与环境隔离。 这是一个有用的调试选项, 用于查看更改统一值的效果 。 默认值为 NT % 3
启用时, 此阶段将先执行 .
readonly bloom : PostProcessStageComposite
开花效应会增加发光效应,使明亮区域变亮,暗色区域变暗.
这一阶段的军服如下: contrast , brainess , glow Only , ,
delta, sigma, and stepSize.
contrastis a scalar value in the range [-255.0, 255.0] and affects the contract of the effect. The default value is128.0.brightnessis 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 2glowOnlyis a boolean value. Whentrue, only the glow effect will be shown. Whenfalse, the glow will be added to the input texture. The default value isfalse. 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.
模糊度被应用到图像产生的阴影上,使其更加平滑.
启用时, 此阶段将先执行 .
-
Default Value:
1.0
Example:
viewer.scene.postProcessStages.exposure = 1.0;
readonly fxaa : PostProcessStage
启用时, 此阶段将执行 .
tonemapper : Tonemapper
-
Default Value:
Tonemapper.PBR_NEUTRAL
Example:
viewer.scene.postProcessStages.tonemapper = Cesium.Tonemapper.ACES;
Methods
add(stage) → PostProcessStage|PostProcessStageComposite
| 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.
| Name | Type | Description |
|---|---|---|
stage |
PostProcessStage | PostProcessStageComposite | 过程后阶段. |
Returns:
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.
get(index) → PostProcessStage|PostProcessStageComposite
| Name | Type | Description |
|---|---|---|
index |
number | 后处理阶段的索引. |
Returns:
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.
| Name | Type | Description |
|---|---|---|
stage |
PostProcessStage | PostProcessStageComposite | 从收藏中删除的后处理阶段. |