Skip to content

KTX Cube Textures Fail #16089

@John-DeCorato-HZ

Description

@John-DeCorato-HZ

Loading a compressed cube KTX texture causes THREE.js to crash. The bug appears to be that CompressedImageTextures with an array as their image are still treated as individual images. This bug is related to a PR that I submitted earlier this morning.

There is an additional bug with the KTX Texture loader, in that the supplied mipmaps are loaded in the level order [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, etc] when CompressedTexture expected them to be in order [0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, etc], but I believe this is a greater issue that needs to be addressed first.

The place that THREE.js crashes is

for ( var i = 0, il = mipmaps.length; i < il; i ++ ) {
, because it's attempting to read the mipmaps from the base image container when the mipmaps are all stored in an array inside of the image parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions