Skip to content

Commit

Permalink
Merge 2311aad into c773601
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhuang01 committed May 30, 2019
2 parents c773601 + 2311aad commit 49cb39e
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dev-docs/RFCs/v7.x/post-process-effect-rfc.md
Expand Up @@ -11,8 +11,8 @@ Post-processing effect rendering is part of deck.gl effect rendering pipeline, f

A post-processing effect is created from `PostProcessEffect` class and Shader module.
```js
import {brightnessContrast} from @luma.gl/effects;
import {PostProcessEffect} from @deck.gl/core;
import {brightnessContrast} from '@luma.gl/effects';
import {PostProcessEffect} from '@deck.gl/core';

const postProcessEffect = new PostProcessEffect(brightnessContrast, {
brightness: 0.5,
Expand Down
2 changes: 1 addition & 1 deletion docs/effects/lighting-effect.md
Expand Up @@ -45,4 +45,4 @@ Array of [PointLight](/docs/api-reference/lights/point-light.md) source which em

## Source

[/modules/core/src/effects/lighting-effect.js](https://github.com/uber/deck.gl/tree/master/modules/core/src/effects/lighting/lighting-effect.js)
[/modules/core/src/effects/lighting/lighting-effect.js](https://github.com/uber/deck.gl/tree/master/modules/core/src/effects/lighting/lighting-effect.js)
40 changes: 40 additions & 0 deletions docs/effects/post-process-effect.md
@@ -0,0 +1,40 @@
# PostProcessEffect

The post-processing Effect applies kinds of screen space pixel manipulation effects to deck.gl layers.

## Constructor

```js
new PostProcessEffect(shaderModule, props);
```

Parameters:
* `shaderModule`(Object) - a shader module wraps a screen space effect. For supported effects see [glfx shader modules](https://github.com/uber/luma.gl/blob/master/modules/effects/src/index.js).
* `props`(Object) - parameters to replace the default values in shader module.

## Example

```js
import {brightnessContrast} from '@luma.gl/effects';
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.js](https://github.com/uber/deck.gl/tree/master/modules/core/src/effects/post-process-effect.js)
4 changes: 4 additions & 0 deletions website/contents/pages.js
Expand Up @@ -576,6 +576,10 @@ export const docPages = generatePath([
{
name: 'LightingEffect',
content: getDocUrl('effects/lighting-effect.md')
},
{
name: 'PostProcessEffect',
content: getDocUrl('effects/post-process-effect.md')
}
]
},
Expand Down

0 comments on commit 49cb39e

Please sign in to comment.