Merge pull request #13973 from mike-000/bandcount

Fix bandcount per texture for 8, 12, 16, etc. bands
This commit is contained in:
Tim Schaub
2022-08-12 06:08:58 -06:00
committed by GitHub
3 changed files with 60 additions and 1 deletions

View File

@@ -278,7 +278,7 @@ class TileTexture extends EventTarget {
this.textures.push(texture);
const bandCount =
textureIndex < textureCount - 1 ? 4 : this.bandCount % 4;
textureIndex < textureCount - 1 ? 4 : ((this.bandCount - 1) % 4) + 1;
textureDataArrays[textureIndex] = new DataType(pixelCount * bandCount);
}