The PostProcessEffect
applies screen space pixel manipulation effects to deck.gl layers.
<iframe height="450" width="100%" scrolling="no" title="deck.gl PostProcessEffect Demo" src="https://codepen.io/vis-gl/embed/YbRGvv/?height=450&theme-id=light&default-tab=result" frameborder="no" allowtransparency="true" allowfullscreen="true">
See the Pen deck.gl PostProcessEffect Demo by vis.gl
(@vis-gl) on CodePen.
</iframe>
new PostProcessEffect(shaderModule, props);
Parameters:
shaderModule
(object) - a shader module wraps a screen space effect. For supported effects see luma.gl shader modules.props
(object) - parameters to replace the default values in shader module.
import {brightnessContrast} from '@luma.gl/shadertools';
import {PostProcessEffect} from '@deck.gl/core';
const postProcessEffect = new PostProcessEffect(brightnessContrast, {
brightness: 1.0,
contrast: 1.0
});
const deckgl = new Deck({
canvas: 'my-deck-canvas',
initialViewState,
controller: true,
// add effect to deck
effects: [postProcessEffect],
layers: [new GeoJsonLayer({
...
})]
});