ws-tex: image/ktx (KTX1 + KTX2 read: BCn / ETC2 / EAC / uncompressed, mips, cube, arrays, 3D, Zstd / ZLIB; Basis UNSUPPORTED; KTX2 write)

KTX2 writer: rgba8 (UNORM / SRGB), rgba16, rgba16f / rgba32f with a full DFD, mips, cube / array frames, ZLIB.
Tested against ktx create / deflate / extract, toktx, nvcompress -ktx and hand-written KTX1 (big-endian, packed,
row padding, T=u); our files pass ktx validate.
This commit is contained in:
4DBug committed 2026-10-31 14:30:30 -05:00
1 parent e59f5409a7
commit ef2cd93c88
7 files changed
+1154

No files matched your search

+12
View File
@@ -86,6 +86,18 @@ local list: { Entry } = {
return require("@formats/image/jpeg")
end,
},
{
name = "ktx",
category = "image",
path = "image/ktx",
extensions = { "ktx2", "ktx" },
mime = { "image/ktx2", "image/ktx" },
deps = { "core/Err", "core/Bytes", "core/Sniff", "Types", "codecs/compress/Deflate", "codecs/compress/Zstd", "codecs/image/Texel", "codecs/image/Texture" },
caps = { decode = true, encode = true, alpha = true, float = true, mipmaps = true, cubemap = true, compressed = { "bc1", "bc2", "bc3", "bc4", "bc5", "bc6h", "bc7", "etc1", "etc2", "eac" } },
load = function()
return require("@formats/image/ktx")
end,
},
{
name = "png",
category = "image",