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

Method initialize

src/effects/SelectiveBloomEffect.js:328–354  ·  view source on GitHub ↗

* Performs initialization tasks. * * @param {WebGLRenderer} renderer - The renderer. * @param {Boolean} alpha - Whether the renderer uses the alpha channel. * @param {Number} frameBufferType - The type of the main frame buffers.

(renderer, alpha, frameBufferType)

Source from the content-addressed store, hash-verified

326 */
327
328 initialize(renderer, alpha, frameBufferType) {
329
330 super.initialize(renderer, alpha, frameBufferType);
331
332 this.clearPass.initialize(renderer, alpha, frameBufferType);
333 this.depthPass.initialize(renderer, alpha, frameBufferType);
334 this.depthMaskPass.initialize(renderer, alpha, frameBufferType);
335
336 if(renderer !== null && renderer.capabilities.logarithmicDepthBuffer) {
337
338 this.depthMaskPass.fullscreenMaterial.defines.LOG_DEPTH = "1";
339
340 }
341
342 if(frameBufferType !== undefined) {
343
344 this.renderTargetMasked.texture.type = frameBufferType;
345
346 if(renderer !== null && renderer.outputColorSpace === SRGBColorSpace) {
347
348 this.renderTargetMasked.texture.colorSpace = SRGBColorSpace;
349
350 }
351
352 }
353
354 }
355
356}

Callers

nothing calls this directly

Calls 1

initializeMethod · 0.65

Tested by

no test coverage detected