Image2D unpacking for RGBA8Unorm images will try and always fail to extract into BC7/ASTC if requested #18

Closed
opened 2026-09-15 02:49:46 +00:00 by sessamekesh · 0 comments
Owner

Affected methods all take an image_format parameter 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 igasset should always return RGBA8Unorm encoded data when decoding an uncompressed image.

Affected methods all take an `image_format` parameter 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 `igasset` should always return RGBA8Unorm encoded data when decoding an uncompressed image.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
indigocode/igasset#18
No description provided.