You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce:
I have an 8k PNG texture, which I'd like to convert to KTX2 for use in a WebGL application.
This is the command I'm using: ktx create --format R8G8B8_SRGB --generate-mipmap --assign-oetf srgb --encode basis-lz --clevel 2 --qlevel 128 earth_color_8K.png earth_color_8K.ktx2
After validation with ktx validate earth_color_8k.ktx2
It says the following error:
Validation failed
error-4001: Invalid Level Index. Indices must be sorted from the largest level to the smallest level.
Indexes for level 11 with byteLength 3 and level 12 with byteLength 4 are incorrectly ordered.
warning-5004: Non-conformant texture file accepted by libktx.
KTX 2.0 file does not conform to the specification but it is currently accepted by libktx.
(Actually the original files were 16K resolution, but I resized the image so I can upload it here. The problem doesn't happen below 8K resolution with this image, as far as I tested (4k, 2k, 1k), and it doesn't happen with other 16k and 8k images, either...)
The text was updated successfully, but these errors were encountered:
It looks like the validator is using only the byte length to determine level ordering and BasisLZ compression is resulting in level 11 being smaller than level 12. It is not entirely surprising as the actual data is in the global dictionaries in the supercompression global data. The level data is references to those dictionaries.
@aqnuep I think this is one for you. For some reason your handle is no longer appearing in the list of possible assignees even though you still have write permission to the repo.
We'll take a look at this. IIRC we should have had some special cases to deal with supercompressions so that we check the uncompressed byte lengths, but there could be some corner case here for BasisLZ that isn't handled as expected.
Steps to reproduce:
I have an 8k PNG texture, which I'd like to convert to KTX2 for use in a WebGL application.
This is the command I'm using:
ktx create --format R8G8B8_SRGB --generate-mipmap --assign-oetf srgb --encode basis-lz --clevel 2 --qlevel 128 earth_color_8K.png earth_color_8K.ktx2
After validation with
ktx validate earth_color_8k.ktx2
It says the following error:
Logging out the info with
ktx info
shows me this:I'm attaching the original PNG file here:
earth_color_8K_2.png.zip
And the generated KTX2 file here:
earth_color_8K_2.ktx2.zip
(Actually the original files were 16K resolution, but I resized the image so I can upload it here. The problem doesn't happen below 8K resolution with this image, as far as I tested (4k, 2k, 1k), and it doesn't happen with other 16k and 8k images, either...)
The text was updated successfully, but these errors were encountered: