KTX
Script error: No such module "AfC submission catcheck". Script error: No such module "AfC submission catcheck".
Developer(s) | Khronos Group |
---|---|
Stable release | 2.0.0
/ April 18, 2021 |
Repository | www |
Engine | |
Operating system | Cross-platform |
Platform | Cross-platform |
Type | GPU Texture Fiel Format |
License | Apache License 2.0 |
Website | www |
Search KTX on Amazon.
KTX (Khronos TeXtures) is an open, royalty-free cross-platform container file format for distributing GPU textures. The contents of a KTX file can range from a simple base-level 2D texture to a cubemap array texture with mipmaps. KTX files hold all the parameters needed for efficient texture loading into 3D APIs such as OpenGL and Vulkan. It is developed by a working group managed by the Khronos Group consortium.
History[edit]
KTX 1.0 was released on 22nd December 2018. In April 2021 the KTX 2.0[1] specification was released, adding support for Basis Universal supercompressed textures, plus set of open source tools for creating, validating and inspecting KTX files. Basis Universal is a codec that produces compact textures that can be efficiently transcoded to a variety of GPU compressed texture formats at run-time. basis_universal [2] was developed by Binomial and is hosted on gitHub under an Apache 2 license.
Uses[edit]
To be completed - reference to glTF and other use cases.
Syntax[edit]
Basic File Structure
Byte[12] identifier
UInt32 vkFormat
UInt32 typeSize
UInt32 pixelWidth
UInt32 pixelHeight
UInt32 pixelDepth
UInt32 layerCount
UInt32 faceCount
UInt32 levelCount
UInt32 supercompressionScheme
// Index
UInt32 dfdByteOffset
UInt32 dfdByteLength
UInt32 kvdByteOffset
UInt32 kvdByteLength
UInt64 sgdByteOffset
UInt64 sgdByteLength
// Level Index
struct {
UInt64 byteOffset
UInt64 byteLength
UInt64 uncompressedByteLength
} levels[max(1, levelCount)]
// Data Format Descriptor
UInt32 dfdTotalSize
continue
dfDescriptorBlock dfdBlock
︙
until dfdByteLength read
// Key/Value Data
continue
UInt32 keyAndValueByteLength
Byte keyAndValue[keyAndValueByteLength]
align(4) valuePadding
︙
until kvdByteLength read
if (sgdByteLength > 0)
align(8) sgdPadding
// Supercompression Global Data
Byte supercompressionGlobalData[sgdByteLength]
// Mip Level Array
for each mip_level in levelCount
Byte levelImages[bytesOfLevelImages]
end
Motivation[edit]
To be completed
Comparison with other formats[edit]
To be completed
See Also[edit]
- Official website
- KTX Specification Registry
- An Artists Guide to Using KTX on GitHub
- A Developers Guide to using KTX on GitHub
- Open Source KTX Tools on GitHub
References[edit]
This article "KTX" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:KTX. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.