MCPcopy Create free account
hub / github.com/pmndrs/postprocessing / constructor

Method constructor

src/core/EffectComposer.js:44–138  ·  view source on GitHub ↗

* Constructs a new effect composer. * * @param {WebGLRenderer} renderer - The renderer that should be used. * @param {Object} [options] - The options. * @param {Boolean} [options.depthBuffer=true] - Whether the main render targets should have a depth buffer. * @param {Boolean} [options.ste

(renderer = null, {
		depthBuffer = true,
		stencilBuffer = false,
		multisampling = 0,
		frameBufferType
	} = {})

Source from the content-addressed store, hash-verified

42 */
43
44 constructor(renderer = null, {
45 depthBuffer = true,
46 stencilBuffer = false,
47 multisampling = 0,
48 frameBufferType
49 } = {}) {
50
51 /**
52 * The renderer.
53 *
54 * @type {WebGLRenderer}
55 * @private
56 */
57
58 this.renderer = null;
59
60 /**
61 * The input buffer.
62 *
63 * Two identical buffers are used to avoid reading from and writing to the same render target.
64 *
65 * @type {WebGLRenderTarget}
66 * @private
67 */
68
69 this.inputBuffer = this.createBuffer(depthBuffer, stencilBuffer, frameBufferType, multisampling);
70
71 /**
72 * The output buffer.
73 *
74 * @type {WebGLRenderTarget}
75 * @private
76 */
77
78 this.outputBuffer = this.inputBuffer.clone();
79
80 /**
81 * A copy pass used for copying masked scenes.
82 *
83 * @type {CopyPass}
84 * @private
85 */
86
87 this.copyPass = new CopyPass();
88
89 /**
90 * A depth texture.
91 *
92 * @type {DepthTexture}
93 * @private
94 */
95
96 this.depthTexture = null;
97
98 /**
99 * A render target that holds a stable copy of the scene depth.
100 *
101 * The scene depth needs to be copied to avoid feedback loops and undefined behavior that can happen when the same

Callers

nothing calls this directly

Calls 2

createBufferMethod · 0.95
setRendererMethod · 0.95

Tested by

no test coverage detected