Browse Source

Merge pull request #2960 from NicolasBuecher/fix_rtt_clone

Fix: Block RenderTargetTexture clone when cloning a material
David Catuhe 7 years ago
parent
commit
e51f2ad45a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/Tools/babylon.decorators.ts

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

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