瀏覽代碼

Merge pull request #2960 from NicolasBuecher/fix_rtt_clone

Fix: Block RenderTargetTexture clone when cloning a material
David Catuhe 7 年之前
父節點
當前提交
e51f2ad45a
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Tools/babylon.decorators.ts

+ 2 - 0
src/Tools/babylon.decorators.ts

@@ -25,6 +25,8 @@
                         (<any>destination)[property] = sourceProperty;
                         (<any>destination)[property] = sourceProperty;
                         break;
                         break;
                     case 1:     // Texture
                     case 1:     // Texture
+                        (<any>destination)[property] = (instanciate||sourceProperty.isRenderTarget)?sourceProperty:sourceProperty.clone();
+                        break;
                     case 2:     // Color3
                     case 2:     // Color3
                     case 3:     // FresnelParameters
                     case 3:     // FresnelParameters
                     case 4:     // Vector2
                     case 4:     // Vector2