Skip to content
Discussion options

You must be logged in to vote

Do you need to know in advance programmatically? If so, why?

The format comes directly from the ktx_transcode_fmt_e you specify. For example

KTX_TTF_BC3_RGBA is equivalent to VK_FORMAT_BC3_{UNORM,SRGB}_BLOCK. Whether it is UNORM or SRGB is decided by the image data as indicated by the return value of ktxTexture2_GetTransferFunction_e. If it is KHR_DF_TRANSFER_SRGB the result will be SRGB otherwise it will be UNORM.

Similarly KTX_TTF_ASTC_4x4_RGBA means transcode to VK_FORMAT_ASTC_4x4_{UNORM,SRGB}_BLOCK.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tuket
Comment options

Answer selected by MarkCallow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants