Browse Source

Merge pull request #6121 from sebavan/master

Fix #6119 DDS Cascaded Loading
sebavan 6 years ago
parent
commit
82093d3fcc
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Misc/dds.ts

+ 2 - 1
src/Misc/dds.ts

@@ -533,7 +533,8 @@ export class DDSTools {
             mipmapCount = Math.max(1, header[off_mipmapCount]);
             mipmapCount = Math.max(1, header[off_mipmapCount]);
         }
         }
 
 
-        for (var face = 0; face < faces; face++) {
+        const startFace = currentFace || 0;
+        for (var face = startFace; face < faces; face++) {
             width = header[off_width];
             width = header[off_width];
             height = header[off_height];
             height = header[off_height];