Skip to content

Commit 774f661

Browse files
authored
1 parent 7ca8939 commit 774f661

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/dev/core/src/Materials/Textures/mirrorTexture.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { BlurPostProcess } from "../../PostProcesses/blurPostProcess";
1010
import { Constants } from "../../Engines/constants";
1111
import { Plane } from "../../Maths/math.plane";
1212
import type { UniformBuffer } from "../uniformBuffer";
13+
import type { TextureSize } from "../../Materials/Textures/textureCreationOptions";
14+
1315
/**
1416
* Mirror texture can be used to simulate the view from a mirror in a scene.
1517
* It will dynamically be rendered every frame to adapt to the camera point of view.
@@ -102,6 +104,15 @@ export class MirrorTexture extends RenderTargetTexture {
102104
this.blurKernelY = this._adaptiveBlurKernel * dh;
103105
}
104106

107+
public override resize(size: TextureSize | { ratio: number }): void {
108+
super.resize(size);
109+
if (!this._adaptiveBlurKernel) {
110+
this._preparePostProcesses();
111+
} else {
112+
this._autoComputeBlurKernel();
113+
}
114+
}
115+
105116
protected override _onRatioRescale(): void {
106117
if (this._sizeRatio) {
107118
this.resize(this._initialSizeParameter);

0 commit comments

Comments
 (0)