fix bandcount per texture for 8, 12, 16, etc bands

This commit is contained in:
mike-000
2022-08-12 00:34:50 +01:00
parent dd1edc37ca
commit b5b53b244f
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);
}