Popov72 il y a 5 ans
Parent
commit
42692d3275
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  1. 1 2
      serializers/src/glTF/2.0/glTFMaterialExporter.ts

+ 1 - 2
serializers/src/glTF/2.0/glTFMaterialExporter.ts

@@ -1120,8 +1120,7 @@ export class _GLTFMaterialExporter {
     }
 
     private getPixelsFromTexture(babylonTexture: BaseTexture): Promise<Nullable<Uint8Array | Float32Array>> {
-        // TODO WEBGPU remove the as unknown cast once using the new babylonjs package to compile the glTF material exporter
-        const pixels = babylonTexture.textureType === Constants.TEXTURETYPE_UNSIGNED_INT ? babylonTexture.readPixels() as unknown as Promise<Uint8Array> : babylonTexture.readPixels() as unknown as Promise<Float32Array>;
+        const pixels = babylonTexture.textureType === Constants.TEXTURETYPE_UNSIGNED_INT ? babylonTexture.readPixels() as Promise<Uint8Array> : babylonTexture.readPixels() as Promise<Float32Array>;
         return pixels;
     }