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

Method setSize

src/effects/SSAOEffect.js:576–589  ·  view source on GitHub ↗

* Sets the size. * * @param {Number} width - The width. * @param {Number} height - The height.

(width, height)

Source from the content-addressed store, hash-verified

574 */
575
576 setSize(width, height) {
577
578 const resolution = this.resolution;
579 resolution.setBaseSize(width, height);
580 const w = resolution.width, h = resolution.height;
581
582 this.ssaoMaterial.copyCameraSettings(this.camera);
583 this.ssaoMaterial.setSize(w, h);
584 this.renderTarget.setSize(w, h);
585
586 this.depthDownsamplingPass.resolution.scale = resolution.scale;
587 this.depthDownsamplingPass.setSize(width, height);
588
589 }
590
591 /**
592 * Performs initialization tasks.

Callers 1

constructorMethod · 0.95

Calls 3

setBaseSizeMethod · 0.80
setSizeMethod · 0.65
copyCameraSettingsMethod · 0.45

Tested by

no test coverage detected