Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.69 KB

post-process-effect.md

File metadata and controls

48 lines (37 loc) · 1.69 KB

PostProcessEffect

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>

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