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