瀏覽代碼

Merge pull request #3284 from sebavan/master

Fixed #3283: Float Raw texture
sebavan 7 年之前
父節點
當前提交
74738ff176
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/Materials/Textures/babylon.internalTexture.ts
  2. 1 1
      src/Materials/Textures/babylon.rawTexture.ts

+ 1 - 1
src/Materials/Textures/babylon.internalTexture.ts

@@ -116,7 +116,7 @@ module BABYLON {
 
                 case InternalTexture.DATASOURCE_RAW:
                     proxy = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, 
-                                                            this.invertY, this.samplingMode, this._compression); 
+                                                            this.invertY, this.samplingMode, this._compression, this.type); 
                     proxy._swapAndDie(this);
 
                     this.isReady = true;

+ 1 - 1
src/Materials/Textures/babylon.rawTexture.ts

@@ -11,7 +11,7 @@
         }
 
         public update(data: ArrayBufferView): void {
-            this._engine.updateRawTexture(this._texture, data, this.format, this._invertY);
+            this._engine.updateRawTexture(this._texture, data, this._texture!.format, this._texture!.invertY, undefined, this._texture!.type);
         }
 
         // Statics