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

Method initialize

src/passes/EffectPass.js:611–631  ·  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

609 */
610
611 initialize(renderer, alpha, frameBufferType) {
612
613 this.renderer = renderer;
614
615 // Initialize effects before building the shader.
616 for(const effect of this.effects) {
617
618 effect.initialize(renderer, alpha, frameBufferType);
619
620 }
621
622 // Initialize the fullscreen material.
623 this.updateMaterial();
624
625 if(frameBufferType !== undefined && frameBufferType !== UnsignedByteType) {
626
627 this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH = "1";
628
629 }
630
631 }
632
633 /**
634 * Deletes disposable objects.

Callers

nothing calls this directly

Calls 2

updateMaterialMethod · 0.95
initializeMethod · 0.65

Tested by

no test coverage detected