bkaradzic / bimg

Image library.
BSD 2-Clause "Simplified" License
333 stars 270 forks source link

Ktx fixes #82

Closed RazielXYZ closed 1 year ago

RazielXYZ commented 1 year ago

Fixing our bimg ktx parsing and generation code to bring it in line with ktx spec. This includes: changing glBaseInternalFormat to the base formats expected for compressed formats (Red, RG, RGB, RGBA respectively for the different compressed formats) Ensuring depth is at least 1 in bimg, and that depth of 1 in bimg writes as 0 to ktx Ensuring that 1 layer in bimg writes as 0 to ktx Ensuring that cubeMap writes as 6 faces to ktx, and that exactly 6 faces in ktx correspond to cubemap in bimg Ensuring that mip size for cubemap mip is not multiplied by number of faces when written to ktx