.new PostProcessorModule(paramsopt)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
params |
Object
|
<optional> |
Example
Creating a rendering module and passing it to App's modules
new App([
new ElementModule(),
new SceneModule(),
new DefineModule('camera', new WHS.PerspectiveCamera({
position: new THREE.Vector3(0, 6, 18),
far: 10000
})),
new RenderingModule(),
new PostProcessorModule()
]);
const processor = app.use('postprocessor');
processor
.render()
.pass(new GlitchPass())
.renderToScreen()
Methods
(static) .get(name) → {this}
Returns a pass by the given name
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String
|
The name of the pass |
(static) .pass(pass) → {this}
Adds your custom pass
Parameters:
| Name | Type | Description |
|---|---|---|
pass |
Pass
|
A custom pass |
(static) .renderToScreen(nameopt) → {this}
Sets the renderToScreen property of currentPass
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
name |
String
|
<optional> |
true
|
The name of the pass |
(static) .shader(material, textureID) → {this}
Adds a pass made from shader material
Parameters:
| Name | Type | Description |
|---|---|---|
material |
Material
|
A ShaderMaterial |
textureID |
String
|
Name of the readBuffer uniform |