File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/dev/core/src/Materials/Textures Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import { BlurPostProcess } from "../../PostProcesses/blurPostProcess";
1010import { Constants } from "../../Engines/constants" ;
1111import { Plane } from "../../Maths/math.plane" ;
1212import 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 ) ;
You can’t perform that action at this time.
0 commit comments