-
Name Type Description optionsOptions.
Name Type Description webGlContextWebGLRenderingContext WebGL context; mandatory.
scaleRationumber Scale ratio; if < 1, the post process will render to a texture smaller than the main canvas that will then be sampled up (useful for saving resource on blur steps).
vertexShaderstring Vertex shader source
fragmentShaderstring Fragment shader source
uniformsObject.<string, module:ol/webgl/Helper~UniformValue> Uniform definitions for the post process step
Methods
-
Render to the next postprocessing pass (or to the canvas if final pass).
Name Type Description frameStatemodule:ol/PluggableMap~FrameState current frame state
nextPassmodule:ol/webgl/PostProcessingPass~WebGLPostProcessingPass Next pass, optional
frameState.pixelRationumber The pixel ratio of the frame.
frameState.timenumber The time when rendering of the frame was requested.
frameState.viewStatemodule:ol/View~State The state of the current view.
frameState.animateboolean frameState.coordinateToPixelTransformmodule:ol/transform~Transform frameState.declutterTreemodule:rbush frameState.extentnull | module:ol/extent~Extent frameState.indexnumber frameState.layerStatesArrayArray.<module:ol/layer/Layer~State> frameState.layerIndexnumber frameState.pixelToCoordinateTransformmodule:ol/transform~Transform frameState.postRenderFunctionsArray.<module:ol/PluggableMap~PostRenderFunction> frameState.sizemodule:ol/size~Size frameState.tileQueuemodule:ol/TileQueue~TileQueue frameState.usedTilesObject.<string, Object.<string, boolean>> frameState.viewHintsArray.<number> frameState.wantedTilesObject.<string, Object.<string, boolean>> -
Returns:
Frame buffer
-
Get the WebGL rendering context
Returns:
The rendering context.
-
Initialize the render target texture of the post process, make sure it is at the right size and bind it as a render target for the next draw calls. The last step to be initialized will be the one where the primitives are rendered.
Name Type Description frameStatecurrent frame state
Name Type Description pixelRationumber The pixel ratio of the frame.
timenumber The time when rendering of the frame was requested.
viewStatemodule:ol/View~State The state of the current view.
animateboolean coordinateToPixelTransformmodule:ol/transform~Transform declutterTreemodule:rbush extentnull | module:ol/extent~Extent indexnumber layerStatesArrayArray.<module:ol/layer/Layer~State> layerIndexnumber pixelToCoordinateTransformmodule:ol/transform~Transform postRenderFunctionsArray.<module:ol/PluggableMap~PostRenderFunction> sizemodule:ol/size~Size tileQueuemodule:ol/TileQueue~TileQueue usedTilesObject.<string, Object.<string, boolean>> viewHintsArray.<number> wantedTilesObject.<string, Object.<string, boolean>>
OpenLayers