diff --git a/packages/core/src/framebuffer/Framebuffer.js b/packages/core/src/framebuffer/Framebuffer.js index 018753e..786992e 100644 --- a/packages/core/src/framebuffer/Framebuffer.js +++ b/packages/core/src/framebuffer/Framebuffer.js @@ -136,12 +136,18 @@ for (let i = 0; i < this.colorTextures.length; i++) { - this.colorTextures[i].setSize(width, height); + const texture = this.colorTextures[i]; + const resolution = texture.resolution; + + // take into acount the fact the texture may have a different resolution.. + texture.setSize(width / resolution, height / resolution); } if (this.depthTexture) { - this.depthTexture.setSize(width, height); + const resolution = this.depthTexture.resolution; + + this.depthTexture.setSize(width / resolution, height / resolution); } }