A collection of
PostProcessStages or other post-process composite stages that execute together logically.
所有阶段按数组顺序执行. 输入纹理变化基于 NT 0 put PreviousStageTexture NT 1 . 如果 NT 0 put PreviousStageTexture NT 1 是 NT 2 true NT 3 ,则每个阶段的输入是现场或之前执行的阶段向输出纹理. 如果 NT 0 输入 PreviousStageTexture NT 1 为 NT 2 false NT 3 ,则复合材料中每个阶段的输入纹理相同. 输入纹理是场景给的纹理 或前一个阶段的输出纹理.
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
具有下列属性的天体:
|
Throws:
-
DeveloperError : options.stages.length must be greater than 0.0.
Examples:
// Example 1: separable blur filter
// The input to blurXDirection is the texture rendered to by the scene or the output of the previous stage.
// The input to blurYDirection is the texture rendered to by blurXDirection.
scene.postProcessStages.add(new Cesium.PostProcessStageComposite({
stages : [blurXDirection, blurYDirection]
}));
// Example 2: referencing the output of another post-process stage
scene.postProcessStages.add(new Cesium.PostProcessStageComposite({
inputPreviousStageTexture : false,
stages : [
// The same as Example 1.
new Cesium.PostProcessStageComposite({
inputPreviousStageTexture : true
stages : [blurXDirection, blurYDirection],
name : 'blur'
}),
// The input texture for this stage is the same input texture to blurXDirection since inputPreviousStageTexture is false
new Cesium.PostProcessStage({
fragmentShader : compositeShader,
uniforms : {
blurTexture : 'blur' // The output of the composite with name 'blur' (the texture that blurYDirection rendered to).
}
})
]
});
// Example 3: create a uniform alias
const uniforms = {};
Cesium.defineProperties(uniforms, {
filterSize : {
get : function() {
return blurXDirection.uniforms.filterSize;
},
set : function(value) {
blurXDirection.uniforms.filterSize = blurYDirection.uniforms.filterSize = value;
}
}
});
scene.postProcessStages.add(new Cesium.PostProcessStageComposite({
stages : [blurXDirection, blurYDirection],
uniforms : uniforms
}));
See:
Members
准备时是否执行此后处理阶段 .
所有后处理阶段按数组顺序执行. 输入纹理变化基于 NT 0 put PreviousStageTexture NT 1 .
如果 NT 0 put PreviousStageTexture NT 1 是 NT 2 true NT 3 ,则每个阶段的输入是现场或之前执行的阶段向输出纹理.
如果 NT 0 输入 PreviousStageTexture NT 1 为 NT 2 false NT 3 ,则复合材料中每个阶段的输入纹理相同. 输入纹理是场景给的纹理
或前一个阶段的输出纹理.
本复合材料中流程后阶段的数量.
用于PostProcessStage Complex中其他阶段参考的这个后处理阶段的独有名称.
确定此进程后阶段是否准备执行 .
应用后进程所选择的特性 .
后处理阶段统一值的别名. 可能是 NT 0 undefine NT 1 ;在这种情况下,让每个阶段设置统一值.
Methods
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.
get(index) → PostProcessStage|PostProcessStageComposite
在 NT 0 index NT 1 获得后处理阶段
| Name | Type | Description |
|---|---|---|
index |
number | 过程后阶段或复合的索引. |
Returns:
索引中的后处理阶段或复合.
Throws:
-
DeveloperError : index must be greater than or equal to 0.
-
DeveloperError : index must be less than
PostProcessStageComposite#length.
如果此对象被销毁, 返回真实; 否则, 错误 .
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.