From 0cf8e8dac5d1eec3ef994a0f27dbe86931e7eda4 Mon Sep 17 00:00:00 2001 From: schmelczerandras Date: Sat, 31 Oct 2020 19:23:45 +0100 Subject: [PATCH] Fix invalidation --- .../frame-buffer/intermediate-frame-buffer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/graphics/graphics-library/frame-buffer/intermediate-frame-buffer.ts b/src/graphics/graphics-library/frame-buffer/intermediate-frame-buffer.ts index a46cfbe..dd00eba 100644 --- a/src/graphics/graphics-library/frame-buffer/intermediate-frame-buffer.ts +++ b/src/graphics/graphics-library/frame-buffer/intermediate-frame-buffer.ts @@ -41,7 +41,9 @@ export class IntermediateFrameBuffer extends FrameBuffer { public invalidate() { if (this.gl.isWebGL2) { - this.gl.invalidateFramebuffer(this.gl.FRAMEBUFFER, [ + this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, this.frameBuffer); + + this.gl.invalidateFramebuffer(this.gl.READ_FRAMEBUFFER, [ this.gl.COLOR_ATTACHMENT0, this.gl.COLOR_ATTACHMENT1, ]);