Methods
static Cesium.PostProcessStageLibrary.createBlackAndWhiteStage() → PostProcessStage
This stage has one uniform value, gradations, which scales the luminance of each pixel.
Returns:
static Cesium.PostProcessStageLibrary.createBlurStage() → PostProcessStageComposite
This stage has the following uniforms: delta, sigma, and stepSize.
delta and sigma are used to compute the weights of a Gaussian filter. The equation is exp((-0.5 * delta * delta) / (sigma * sigma)).
The default value for delta is 1.0. The default value for sigma is 2.0.
stepSize is the distance to the next texel. The default is 1.0.
Returns:
static Cesium.PostProcessStageLibrary.createBrightnessStage() → PostProcessStage
This stage has one uniform value, brightness, which scales the saturation of each pixel.
Returns:
static Cesium.PostProcessStageLibrary.createDepthOfFieldStage() → PostProcessStageComposite
Depth of field simulates camera focus. Objects in the scene that are in focus will be clear whereas objects not in focus will be blurred.
This stage has the following uniforms: focalDistance, delta, sigma, and stepSize.
focalDistance is the distance in meters from the camera to set the camera focus.
delta, sigma, and stepSize are the same properties as PostProcessStageLibrary#createBlurStage.
The blur is applied to the areas out of focus.
Returns:
static Cesium.PostProcessStageLibrary.createEdgeDetectionStage() → PostProcessStage
Writes the color to the output texture with alpha set to 1.0 when it is on an edge.
This stage has the following uniforms: color and length
coloris the color of the highlighted edge. The default isColor#BLACK.lengthis the length of the edges in pixels. The default is0.5.
This stage is not supported in 2D.
Returns:
Example:
// multiple silhouette effects
var yellowEdge = Cesium.PostProcessLibrary.createEdgeDetectionStage();
yellowEdge.uniforms.color = Cesium.Color.YELLOW;
yellowEdge.selected = [feature0];
var greenEdge = Cesium.PostProcessLibrary.createEdgeDetectionStage();
greenEdge.uniforms.color = Cesium.Color.LIME;
greenEdge.selected = [feature1];
// draw edges around feature0 and feature1
postProcessStages.add(Cesium.PostProcessLibrary.createSilhouetteStage([yellowEdge, greenEdge]);
static Cesium.PostProcessStageLibrary.createLensFlareStage() → PostProcessStage
This stage has the following uniforms: dirtTexture, starTexture, intensity, distortion, ghostDispersal,
haloWidth, dirtAmount, and earthRadius.
dirtTextureis a texture sampled to simulate dirt on the lens.starTextureis the texture sampled for the star pattern of the flare.intensityis a scalar multiplied by the result of the lens flare. The default value is2.0.distortionis a scalar value that affects the chromatic effect distortion. The default value is10.0.ghostDispersalis a scalar indicating how far the halo effect is from the center of the texture. The default value is0.4.haloWidthis a scalar representing the width of the halo from the ghost dispersal. The default value is0.4.dirtAmountis a scalar representing the amount of dirt on the lens. The default value is0.4.earthRadiusis the maximum radius of the earth. The default value isEllipsoid.WGS84.maximumRadius.
Returns:
static Cesium.PostProcessStageLibrary.createNightVisionStage() → PostProcessStage
Returns:
static Cesium.PostProcessStageLibrary.createSilhouetteStage(edgeDetectionStages) → PostProcessStageComposite
A silhouette effect composites the color from the edge detection pass with input color texture.
This stage has the following uniforms when edgeDetectionStages is undefined: color and length
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.
| Name | Type | Description |
|---|---|---|
edgeDetectionStages |
Array.<PostProcessStage> | optional An array of edge detection post process stages. |
Returns:
This stage requires the WEBGL_depth_texture extension.
| Name | Type | Description |
|---|---|---|
scene |
Scene | The scene. |
Returns:
This stage requires the WEBGL_depth_texture extension.
| Name | Type | Description |
|---|---|---|
scene |
Scene | The scene. |
Returns:
This stage requires the WEBGL_depth_texture extension.
| Name | Type | Description |
|---|---|---|
scene |
Scene | The scene. |
Returns:
This stage requires the WEBGL_depth_texture extension.
| Name | Type | Description |
|---|---|---|
scene |
Scene | The scene. |
