瀏覽代碼

Removed redundant type check, per PR feedback.

Justin Murray 6 年之前
父節點
當前提交
c0013ee64f
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/Engines/nativeEngine.ts

+ 1 - 2
src/Engines/nativeEngine.ts

@@ -1090,8 +1090,7 @@ export class NativeEngine extends Engine {
     }
 
     private static _GetNativeTextureFormat(format: number, type: number): number {
-        if (format == Engine.TEXTUREFORMAT_RGBA && (type == Engine.TEXTURETYPE_UNSIGNED_INT || type == Engine.TEXTURETYPE_UNSIGNED_BYTE)) {
-            // Note: Babylon considers TEXTURETYPE_UNSIGNED_INT and TEXTURETYPE_UNSIGNED_BYTE to be synonyms.
+        if (format == Engine.TEXTUREFORMAT_RGBA && type == Engine.TEXTURETYPE_UNSIGNED_INT) {
             return NativeTextureFormat.RGBA8;
         }
         else if (format == Engine.TEXTUREFORMAT_RGBA && type == Engine.TEXTURETYPE_FLOAT) {