Used to implement post-processing effects in three.js. The class manages a chain of post-processing passes to produce the final visual result. Post-processing passes are executed in order of their addition/insertion. The last pass is automatically rendered to screen.


[example:webgl_postprocessing postprocessing]
[example:webgl_postprocessing_advanced postprocessing advanced]
[example:webgl_postprocessing_backgrounds postprocessing backgrounds]
[example:webgl_postprocessing_crossfade postprocessing crossfade]
[example:webgl_postprocessing_dof postprocessing depth-of-field]
[example:webgl_postprocessing_dof2 postprocessing depth-of-field 2]
[example:webgl_postprocessing_fxaa postprocessing fxaa]
[example:webgl_postprocessing_glitch postprocessing glitch]
[example:webgl_postprocessing_godrays postprocessing godrays]
[example:webgl_postprocessing_masking postprocessing masking]
[example:webgl_postprocessing_nodes postprocessing node material]
[example:webgl_postprocessing_outline postprocessing outline]
[example:webgl_postprocessing_pixel postprocessing pixelate]
[example:webgl_postprocessing_procedural postprocessing procedural]
[example:webgl_postprocessing_rgb_halftone postprocessing rgb halftone]
[example:webgl_postprocessing_sao postprocessing sao]
[example:webgl_postprocessing_smaa postprocessing smaa]
[example:webgl_postprocessing_sobel postprocessing sobel]
[example:webgl_postprocessing_ssaa postprocessing ssaa]
[example:webgl_postprocessing_ssao postprocessing ssao]
[example:webgl_postprocessing_taa postprocessing taa]
[example:webgl_postprocessing_unreal_bloom postprocessing unreal bloom]
[example:webgl_postprocessing_unreal_bloom_selective postprocessing unreal bloom selective]


[name]( [param:WebGLRenderer renderer], [param:WebGLRenderTarget renderTarget] )

[page:WebGLRenderer renderer] -- The renderer used to render the scene.
[page:WebGLRenderTarget renderTarget] -- (optional) A preconfigured render target internally used by [name].


[property:Array passes]

An array representing the (ordered) chain of post-processing passes.

[property:WebGLRendererTarget readBuffer]

A reference to the internal read buffer. Passes usually read the previous render result from this buffer.

[property:WebGLRenderer renderer]

A reference to the internal renderer.

[property:Boolean renderToScreen]

Whether the final pass is rendered to the screen (default framebuffer) or not.

[property:WebGLRendererTarget writeBuffer]

A reference to the internal write buffer. Passes usually write their result into this buffer.


[method:undefined addPass]( [param:Pass pass] )

pass -- The pass to add to the pass chain.

Adds the given pass to the pass chain.

[method:undefined insertPass]( [param:Pass pass], [param:Integer index] )

pass -- The pass to insert into the pass chain.
index -- Defines the position in the pass chain where the pass should be inserted.

Inserts the given pass into the pass chain at the given index.

[method:Boolean isLastEnabledPass]( [param:Integer passIndex] )

passIndex -- The pass to check.

Returns true if the pass for the given index is the last enabled pass in the pass chain. Used by [name] to determine when a pass should be rendered to screen.

[method:undefined removePass]( [param:Pass pass] )

pass -- The pass to remove from the pass chain.

Removes the given pass from the pass chain.

[method:undefined render]( [param:Float deltaTime] )

deltaTime -- The delta time value.

Executes all enabled post-processing passes in order to produce the final frame.

[method:undefined reset]( [param:WebGLRenderTarget renderTarget] )

[page:WebGLRenderTarget renderTarget] -- (optional) A preconfigured render target internally used by [name]..

Resets the internal state of the [name].

[method:undefined setPixelRatio]( [param:Float pixelRatio] )

pixelRatio -- The device pixel ratio.

Sets device pixel ratio. This is usually used for HiDPI device to prevent blurring output. Thus, the semantic of the method is similar to [page:WebGLRenderer.setPixelRatio]().

[method:undefined setSize]( [param:Integer width], [param:Integer height] )

width -- The width of the [name].
height -- The height of the [name].

Resizes the internal render buffers and passes to (width, height) with device pixel ratio taken into account. Thus, the semantic of the method is similar to [page:WebGLRenderer.setSize]().

[method:undefined swapBuffers]()

Swaps the internal read/write buffers.


[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/postprocessing/EffectComposer.js examples/jsm/postprocessing/EffectComposer.js]