EffectComposer
EffectComposer
The EffectComposer is a crucial component in Angular Three’s postprocessing pipeline. It allows you to combine multiple postprocessing effects and apply them to your 3D scene. The EffectComposer manages the rendering process, applying effects in the order they are defined.
Usage
To use the EffectComposer, wrap your effects inside the <ngtp-effect-composer>
component:
Options
The EffectComposer accepts the following options:
Option | Type | Default | Description |
---|---|---|---|
enabled | boolean | true | Enables or disables the EffectComposer |
depthBuffer | boolean | undefined | Enables depth buffer |
stencilBuffer | boolean | undefined | Enables stencil buffer |
autoClear | boolean | true | Automatically clears the render target |
resolutionScale | number | undefined | Scales the render resolution |
multisampling | number | 8 | Sets the number of samples for multisampling anti-aliasing |
frameBufferType | TextureDataType | HalfFloatType | Sets the frame buffer type |
renderPriority | number | 1 | Sets the render priority |
camera | Camera | undefined | Custom camera for rendering |
scene | Scene | undefined | Custom scene for rendering |
Examples
- Basic usage with Bloom and Vignette effects:
- Using EffectComposer with custom options:
- Combining EffectComposer with other scene elements: