Skip to content

Commit

Permalink
Merge c1c178b into c773601
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhuang01 committed May 30, 2019
2 parents c773601 + c1c178b commit 6a89c23
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 4 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 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)
2 changes: 1 addition & 1 deletion docs/whats-new.md
Expand Up @@ -8,7 +8,7 @@ Release Date: 2019

### Post-processing Effects

A new `PostProcessEffect` class, working with `@luma.gl/effects` module, offers screen-space post-processing effects such as blur, noise, halftone, ink, etc.
A new [PostProcessEffect](/docs/effects/post-process-effect.md) class, working with `@luma.gl/effects` module, offers screen-space post-processing effects such as blur, noise, halftone, ink, etc.

<table style="border: 0;" align="center">
<tbody>
Expand Down
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 6a89c23

Please sign in to comment.