* 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
} = {})
| 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 |
nothing calls this directly
no test coverage detected