Skip to main content

PostProcessEffect

The PostProcessEffect applies screen space pixel manipulation effects to deck.gl layers.

Constructor

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.

Example

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({
...
})]
});

Source

/modules/core/src/effects/post-process-effect.ts