浏览代码

Merge pull request #7371 from Popov72/Fix-bug-resize-MRT

Fix a bug when resizing a MRT
David Catuhe 5 年之前
父节点
当前提交
b953e2d7d3
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      dist/preview release/what's new.md
  2. 1 1
      src/Materials/Textures/multiRenderTarget.ts

+ 1 - 0
dist/preview release/what's new.md

@@ -273,6 +273,7 @@
 - Fixed bug so Playground will now download .env texture files to ./textures in .zip  ([Kyle Belfort](https://github.com/belfortk))
 - It was not possible to change the gaze and laser color in VR ([#7323](https://github.com/BabylonJS/Babylon.js/issues/7323)) ([RaananW](https://github.com/RaananW/))
 - Fixed issue where textures exported using Safari web browser are Y mirrored. ([#7352](https://github.com/BabylonJS/Babylon.js/issues/7352)) ([Drigax](https://github.com/drigax))
+- Fix a bug when resizing a MRT ([Popov72](https://github.com/Popov72))
 
 ## Breaking changes
 

+ 1 - 1
src/Materials/Textures/multiRenderTarget.ts

@@ -219,7 +219,7 @@ export class MultiRenderTarget extends RenderTargetTexture {
      */
     public resize(size: any) {
         this.releaseInternalTextures();
-        this._internalTextures = this._engine.createMultipleRenderTarget(size, this._multiRenderTargetOptions);
+        this._size = size;
         this._createInternalTextures();
     }