* 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)
| 597 | */ |
| 598 | |
| 599 | initialize(renderer, alpha, frameBufferType) { |
| 600 | |
| 601 | try { |
| 602 | |
| 603 | let normalDepthBuffer = this.uniforms.get("normalDepthBuffer").value; |
| 604 | |
| 605 | if(normalDepthBuffer === null) { |
| 606 | |
| 607 | this.depthDownsamplingPass.initialize(renderer, alpha, frameBufferType); |
| 608 | normalDepthBuffer = this.depthDownsamplingPass.texture; |
| 609 | this.uniforms.get("normalDepthBuffer").value = normalDepthBuffer; |
| 610 | this.ssaoMaterial.normalDepthBuffer = normalDepthBuffer; |
| 611 | this.defines.set("NORMAL_DEPTH", "1"); |
| 612 | |
| 613 | } |
| 614 | |
| 615 | } catch(e) { |
| 616 | |
| 617 | // Not supported. |
| 618 | this.depthDownsamplingPass.enabled = false; |
| 619 | |
| 620 | } |
| 621 | |
| 622 | } |
| 623 | |
| 624 | } |
nothing calls this directly
no test coverage detected