Add fb invalidation
This commit is contained in:
parent
9d22805fb0
commit
45b1948f7c
2 changed files with 11 additions and 0 deletions
|
|
@ -39,6 +39,15 @@ export class IntermediateFrameBuffer extends FrameBuffer {
|
||||||
: [this.colorTexture];
|
: [this.colorTexture];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public invalidate() {
|
||||||
|
if (this.gl.isWebGL2) {
|
||||||
|
this.gl.invalidateFramebuffer(this.gl.FRAMEBUFFER, [
|
||||||
|
this.gl.COLOR_ATTACHMENT0,
|
||||||
|
this.gl.COLOR_ATTACHMENT1,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public setSize(canvasSize: ReadonlyVec2): boolean {
|
public setSize(canvasSize: ReadonlyVec2): boolean {
|
||||||
const hasChanged = super.setSize(canvasSize);
|
const hasChanged = super.setSize(canvasSize);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,8 @@ export class RendererImplementation implements Renderer {
|
||||||
);
|
);
|
||||||
this.gl.disable(this.gl.BLEND);
|
this.gl.disable(this.gl.BLEND);
|
||||||
|
|
||||||
|
this.distanceFieldFrameBuffer.invalidate();
|
||||||
|
|
||||||
if (this.stopwatch?.isRunning) {
|
if (this.stopwatch?.isRunning) {
|
||||||
this.stopwatch?.stop();
|
this.stopwatch?.stop();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue