瀏覽代碼

Transfer sampling mode to new texture when cloning an existing one

jahow 10 年之前
父節點
當前提交
182af5e2ee
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Babylon/Materials/Textures/babylon.texture.ts

+ 2 - 2
Babylon/Materials/Textures/babylon.texture.ts

@@ -205,7 +205,7 @@
         }
 
         public clone(): Texture {
-            var newTexture = new BABYLON.Texture(this._texture.url, this.getScene(), this._noMipmap, this._invertY);
+            var newTexture = new BABYLON.Texture(this._texture.url, this.getScene(), this._noMipmap, this._invertY, this._samplingMode);
 
             // Base texture
             newTexture.hasAlpha = this.hasAlpha;
@@ -232,4 +232,4 @@
             return new Texture("data:" + name, scene, noMipmap, invertY, samplingMode, onLoad, onError, data);
         }
     }
-} 
+}