Constructor
new PostEffect(program)
Constructor
Parameters:
Name | Type | Description |
---|---|---|
program |
Program | A Program instance. |
Members
Methods
begin(coloropt)
Begin
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
color |
Color |
<optional> |
A Color instance |
init(width, height, useDepthBufferopt, userStencilBufferopt) → {PostEffect}
Init the post effect composer
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
width |
number | Resulting effect width | ||
height |
number | Resulting effect height | ||
useDepthBuffer |
boolean |
<optional> |
true | True to use depth buffer (useful in 3D) |
userStencilBuffer |
boolean |
<optional> |
false | True to use stencil buffer |
A reference to the instance
render(scene, camera)
Render the given scene
Parameters:
Name | Type | Description |
---|---|---|
scene |
Scene | A Scene instance |
camera |
Camera | A Camera instance |
setEffectValue(name, type, value) → {PostEffect}
Set value of an element from the program
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Element's name in the shader |
type |
Type | Type of value to send |
value |
Array.<number> | number | boolean | Texture | Float32Array | A value |
A reference to the instance
setProgram(program) → {PostEffect}
Set program to use
Parameters:
Name | Type | Description |
---|---|---|
program |
Program | A Program instance |
A reference to the instance