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

Method initialize

src/effects/GodRaysEffect.js:594–617  ·  view source on GitHub ↗

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

(renderer, alpha, frameBufferType)

Source from the content-addressed store, hash-verified

592 */
593
594 initialize(renderer, alpha, frameBufferType) {
595
596 this.blurPass.initialize(renderer, alpha, frameBufferType);
597 this.renderPassLight.initialize(renderer, alpha, frameBufferType);
598 this.copyPass.initialize(renderer, alpha, frameBufferType);
599 this.godRaysPass.initialize(renderer, alpha, frameBufferType);
600
601 if(frameBufferType !== undefined) {
602
603 this.renderTargetA.texture.type = frameBufferType;
604 this.renderTargetB.texture.type = frameBufferType;
605 this.renderTargetLight.texture.type = frameBufferType;
606
607 if(renderer !== null && renderer.outputColorSpace === SRGBColorSpace) {
608
609 this.renderTargetA.texture.colorSpace = SRGBColorSpace;
610 this.renderTargetB.texture.colorSpace = SRGBColorSpace;
611 this.renderTargetLight.texture.colorSpace = SRGBColorSpace;
612
613 }
614
615 }
616
617 }
618
619}

Callers

nothing calls this directly

Calls 1

initializeMethod · 0.65

Tested by

no test coverage detected