Image2D unpacking for RGBA8Unorm images will try and always fail to extract into BC7/ASTC if requested #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Affected methods all take an
image_formatparameter to allow callers to specify their preferred format (RGBA8Unorm, ASTC, BC7):IgpackDecoder::extract_image2d
SingleAssetParser::extract_image2d
Image2D::Unpack
Since compressed texture support is platform-dependent and cannot be assumed, there is ALWAYS a pathway for a caller to request RGBA8Unorm formatted data.
Essentially - callers can ask for whatever format they want (ASTC, BC7, RGBA8Unorm) and the library will use BasisU to decode the supercompressed storage format (ETC1S, UASTC_LDR_4_4) into the appropriate format.
THIS DOES NOT WORK IF THE STORED IMAGE IS UNCOMPRESSED THOUGH!!
All platforms/runtimes support uncompressed RGBA8Unorm data (or should be responsible for post-transforming on their own end), so
igassetshould always return RGBA8Unorm encoded data when decoding an uncompressed image.extract-asset-metadatatool implementation #20extract-asset-metadatatool implementation #20extract-asset-metadatatool implementation #20