Class: EffectPass
Re-exported types from postprocessing
Hierarchy
↳
EffectPass
Table of contents
Constructors
Properties
Methods
- dispose
- getDepthTexture
- getFullscreenMaterial
- initialize
- recompile
- render
- setDepthTexture
- setFullscreenMaterial
- setSize
Constructors
constructor
• new EffectPass(camera
, ...effects
)
Parameters
Name | Type |
---|---|
camera | Camera |
...effects | Effect [] |
Overrides
Defined in
packages/three/types/postprocessing.d.ts:1323
Properties
camera
• Protected
camera: Camera
The camera.
Inherited from
Defined in
packages/three/types/postprocessing.d.ts:612
dithering
• dithering: boolean
Indicates whether dithering is enabled.
Color quantization reduces banding artifacts but degrades performance.
Defined in
packages/three/types/postprocessing.d.ts:1349
enabled
• enabled: boolean
Indicates whether this pass should be executed.
Inherited from
Defined in
packages/three/types/postprocessing.d.ts:637
encodeOutput
• encodeOutput: boolean
Indicates whether this pass encodes its output when rendering to screen.
Defined in
packages/three/types/postprocessing.d.ts:1342
maxTime
• maxTime: number
The maximum time.
If the elapsed time exceeds this value, it will be reset.
Defined in
packages/three/types/postprocessing.d.ts:1337
minTime
• minTime: number
A time offset.
Elapsed time will start at this value.
Defined in
packages/three/types/postprocessing.d.ts:1330
name
• name: string
The name of this pass.
Inherited from
Defined in
packages/three/types/postprocessing.d.ts:602
needsDepthTexture
• needsDepthTexture: boolean
Indicates whether the EffectComposer should prepare a depth texture for this pass.
Set this to true
if this pass relies on depth information from a
preceding RenderPass.
Inherited from
Defined in
packages/three/types/postprocessing.d.ts:632
needsSwap
• needsSwap: boolean
Only relevant for subclassing.
Indicates whether the EffectComposer should swap the frame buffers after this pass has finished rendering.
Set this to false
if this pass doesn't render to the output buffer or
the screen. Otherwise, the contents of the input buffer will be lost.
Inherited from
Defined in
packages/three/types/postprocessing.d.ts:623
renderToScreen
• renderToScreen: boolean
Indicates whether this pass should render to screen.
Inherited from
Defined in
packages/three/types/postprocessing.d.ts:642
scene
• Protected
scene: Scene
The scene to render.
Inherited from
Defined in
packages/three/types/postprocessing.d.ts:607
Methods
dispose
▸ dispose(): void
Deletes disposable objects.
This pass will be inoperative after this method was called!
Returns
void
Overrides
Defined in
packages/three/types/postprocessing.d.ts:1411
getDepthTexture
▸ getDepthTexture(): Texture
Returns the current depth texture.
Returns
Texture
The current depth texture, or null if there is none.
Overrides
Defined in
packages/three/types/postprocessing.d.ts:1362
getFullscreenMaterial
▸ getFullscreenMaterial(): Material
Returns the current fullscreen material.
Returns
Material
The current fullscreen material, or null if there is none.
Inherited from
Defined in
packages/three/types/postprocessing.d.ts:648
initialize
▸ initialize(renderer
, alpha
, frameBufferType
): void
Performs initialization tasks.
Parameters
Name | Type | Description |
---|---|---|
renderer | WebGLRenderer | The renderer. |
alpha | boolean | Whether the renderer uses the alpha channel or not. |
frameBufferType | number | The type of the main frame buffers. |
Returns
void
Overrides
Defined in
packages/three/types/postprocessing.d.ts:1400
recompile
▸ recompile(): void
Updates the shader material.
Warning: This method triggers a relatively expensive shader recompilation.
Returns
void
Defined in
packages/three/types/postprocessing.d.ts:1356
render
▸ render(renderer
, inputBuffer
, outputBuffer
, deltaTime?
, stencilTest?
): void
Renders the effect.
Parameters
Name | Type | Description |
---|---|---|
renderer | WebGLRenderer | The renderer. |
inputBuffer | WebGLRenderTarget | A frame buffer that contains the result of the previous pass. |
outputBuffer | WebGLRenderTarget | A frame buffer that serves as the output render target unless this pass renders to screen. |
deltaTime? | number | - |
stencilTest? | boolean | - |
Returns
void
Overrides
Defined in
packages/three/types/postprocessing.d.ts:1379
setDepthTexture
▸ setDepthTexture(depthTexture
, depthPacking?
): void
Sets the depth texture.
Parameters
Name | Type | Description |
---|---|---|
depthTexture | Texture | A depth texture. |
depthPacking? | number | - |
Returns
void
Overrides
Defined in
packages/three/types/postprocessing.d.ts:1369
setFullscreenMaterial
▸ Protected
setFullscreenMaterial(material
): void
Sets the fullscreen material.
The material will be assigned to a mesh that fills the screen. The mesh will be created once a material is assigned via this method.
Parameters
Name | Type | Description |
---|---|---|
material | Material | A fullscreen material. |
Returns
void
Inherited from
Defined in
packages/three/types/postprocessing.d.ts:657
setSize
▸ setSize(width
, height
): void
Updates the size of this pass.
Parameters
Name | Type | Description |
---|---|---|
width | number | The width. |
height | number | The height. |
Returns
void