Constructor
new PostEffectQueue(app, camera)
Create a new PostEffectQueue
Parameters:
Name | Type | Description |
---|---|---|
app |
pc.Application | The application |
camera |
pc.CameraComponent | The camera component |
Methods
(private) _createOffscreenTarget(useDepth, hdr) → {pc.RenderTarget}
Creates a render target with the dimensions of the canvas, with an optional depth buffer
Parameters:
Name | Type | Description |
---|---|---|
useDepth |
Boolean | Set to true if you want to create a render target with a depth buffer |
hdr |
Boolean | Use HDR render target format |
Returns:
The render target
- Type
- pc.RenderTarget
addEffect(effect)
Adds a post effect to the queue. If the queue is disabled adding a post effect will
automatically enable the queue.
Parameters:
Name | Type | Description |
---|---|---|
effect |
pc.PostEffect | The post effect to add to the queue. |
destroy()
Removes all the effects from the queue and disables it
disable()
Disables the queue and all of its effects.
enable()
Enables the queue and all of its effects. If there are no effects then the queue will not be enabled.
removeEffect(effect)
Removes a post effect from the queue. If the queue becomes empty it will be disabled automatically.
Parameters:
Name | Type | Description |
---|---|---|
effect |
pc.PostEffect | The post effect to remove. |