Constructor
new PostProcessPlugin(shaderCodeopt, includeMainCanvasopt, feedbackTextureopt)
Create global post processing shader
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
shaderCode | string | <optional> | Shadertoy style mainImage code, a pass-through when left out | |
includeMainCanvas | boolean | <optional> | false | combine mainCanvas onto glCanvas |
feedbackTexture | boolean | <optional> | false | also pass the shader's own output from the previous frame as iChannel1, for trails and echoes; iChannel0 is still the frame just drawn |
- Source
Example
// create the post process plugin object
new PostProcessPlugin(shaderCode);Members
feedbackTexture :WebGLTexture|undefined
Type:
Properties- WebGLTexture |
undefined
| Type | Description |
|---|---|
| WebGLTexture | | The previous frame's output, iChannel1, when feedbackTexture is set |
- Source
shader :WebGLProgram|undefined
Type:
Properties- WebGLProgram |
undefined
| Type | Description |
|---|---|
| WebGLProgram | | Shader for post processing |
- Source
texture :WebGLTexture|undefined
Type:
Properties- WebGLTexture |
undefined
| Type | Description |
|---|---|
| WebGLTexture | | Texture for post processing |
- Source
vao :WebGLVertexArrayObject|undefined
Type:
Properties- WebGLVertexArrayObject |
undefined
| Type | Description |
|---|---|
| WebGLVertexArrayObject | | Vertex array object |
- Source