Low-level library for decompression and manipulation of texture blocks compressed using formats such as BC1/DXT1/S3TC, BC2-BC3, BC4/RGTC1, BC5/RGTC2, BC6 (BPTC_FLOAT), BC7 (BPTC), ETC1 and the ETC2 family, loading of KTX and DDS files, and conversion between pixel formats
Clone or download
hglm Fix bugs in ETC2 and ETC2_PUNCHTHROUGH processing
Fix a bug in ETC2 block decompression (planar mode) and bugs in
ETC2_PUNCHTHROUGH decompression (non-opaque differential mode).

Signed-off-by: Harm Hanemaaijer <fgenfb@yahoo.com>
Latest commit cab1158 Jun 3, 2015
Permalink
Failed to load latest commit information.
.gitignore Add texture file viewer test program: detex-view Apr 7, 2015
LICENSE Update license and README.md Mar 30, 2015
Makefile Bump version to v0.1.2 May 15, 2015
Makefile.conf Update Makefile and Makefile.conf Apr 20, 2015
README Update README May 6, 2015
README.md Update README/README.md Apr 20, 2015
bits.c Implement BPTC (BC7) decompression Apr 2, 2015
bits.h Add support for BPTC_FLOAT (BC6H) decompression Apr 2, 2015
bptc-tables.c Add support for BPTC_FLOAT (BC6H) decompression Apr 2, 2015
bptc-tables.h Add support for BPTC_FLOAT (BC6H) decompression Apr 2, 2015
clamp.c Implement ETC_EAC decompression, put clamp table in separate file Mar 31, 2015
convert.c Fix bugs in R16 to SIGNED_R16 and SIGNED_R16 to R16 conversion May 15, 2015
dds.c Eliminate compilation warning messages May 3, 2015
decompress-bc.c Fix serious bug in BC3 (DXT5) decompression function May 12, 2015
decompress-bptc-float.c Add SetMode functions for ETC2_EAC, BPTC and BPTC_FLOAT Apr 30, 2015
decompress-bptc.c Fix bug in BC7 (BPTC) decompression May 13, 2015
decompress-eac.c Add SetMode functions for ETC2_EAC, BPTC and BPTC_FLOAT Apr 30, 2015
decompress-etc.c Fix bugs in ETC2 and ETC2_PUNCHTHROUGH processing Jun 3, 2015
decompress-rgtc.c Move division look-up tables into detex.h May 6, 2015
detex-convert.c Slightly clean-up compilability with C++ May 3, 2015
detex-png.h Slightly clean-up compilability with C++ May 3, 2015
detex-view.c Allow use of Q key to quit detex-view Apr 18, 2015
detex.h Move division look-up tables into detex.h May 6, 2015
division-tables.c Speed-up integer division using look-up tables Apr 30, 2015
file-info.c Add PNG saving capability to detex-convert, fix bugs Apr 19, 2015
file-info.h Implement texture file saving functions Apr 18, 2015
half-float.c Complete support for HDR decompression, other improvements Apr 13, 2015
half-float.h Complete support for HDR decompression, other improvements Apr 13, 2015
hdr.c Complete support for HDR decompression, other improvements Apr 13, 2015
hdr.h Encode more information into texture format value Apr 5, 2015
ktx.c Add PNG saving capability to detex-convert, fix bugs Apr 19, 2015
misc.c Add support for more texture formats Apr 13, 2015
misc.h Implement error message handling Apr 6, 2015
png.c Add PNG saving capability to detex-convert, fix bugs Apr 19, 2015
raw.c Implement texture file saving functions Apr 18, 2015
test-texture-BC1.ktx Provide basic implementation, support BC1/BC2/BC3 Mar 31, 2015
test-texture-BC1A.ktx Provide basic implementation, support BC1/BC2/BC3 Mar 31, 2015
test-texture-BC2.ktx Provide basic implementation, support BC1/BC2/BC3 Mar 31, 2015
test-texture-BC3.ktx Provide basic implementation, support BC1/BC2/BC3 Mar 31, 2015
test-texture-BPTC.ktx Replace BC7 test texture with correct one May 13, 2015
test-texture-BPTC_FLOAT.ktx Replace the BPTC_FLOAT test texture with a higher quality one Apr 20, 2015
test-texture-EAC_R11.ktx Implement signed EAC_R11/RG11 (untested), extend validation program Mar 31, 2015
test-texture-EAC_RG11.ktx Implement signed EAC_R11/RG11 (untested), extend validation program Mar 31, 2015
test-texture-EAC_SIGNED_R11.ktx Implement signed EAC_R11/RG11 (untested), extend validation program Mar 31, 2015
test-texture-ETC1.ktx Provide basic implementation, support BC1/BC2/BC3 Mar 31, 2015
test-texture-ETC2.ktx Provide basic implementation, support BC1/BC2/BC3 Mar 31, 2015
test-texture-ETC2_EAC.ktx Provide basic implementation, support BC1/BC2/BC3 Mar 31, 2015
test-texture-ETC2_PUNCHTHROUGH.ktx Provide basic implementation, support BC1/BC2/BC3 Mar 31, 2015
test-texture-FLOAT_RGB16.ktx Add new conversions, update test program Apr 6, 2015
test-texture-FLOAT_RGBA16.ktx Add new conversions, update test program Apr 6, 2015
test-texture-RGB8.dds Bug fixes, improve DDS handling Apr 8, 2015
test-texture-RGB8.ktx Add new conversions, update test program Apr 6, 2015
test-texture-RGBA8.dds Bug fixes, improve DDS handling Apr 8, 2015
test-texture-RGBA8.ktx Tweak program window title, add RGBA8 test texture Apr 6, 2015
test-texture-RGTC1.ktx Provide test textures for RGTC1 and RGTC2 Apr 3, 2015
test-texture-RGTC2.ktx Provide test textures for RGTC1 and RGTC2 Apr 3, 2015
test-texture-SIGNED_RGTC1.ktx Add support for RGTC1/2 and signed RGTC1/2 decompression Apr 1, 2015
test-texture-SIGNED_RGTC2.ktx Add support for RGTC1/2 and signed RGTC1/2 decompression Apr 1, 2015
test-texture-transparent.png Provide basic implementation, support BC1/BC2/BC3 Mar 31, 2015
test-texture.png Provide basic implementation, support BC1/BC2/BC3 Mar 31, 2015
texture.c Implement error message handling Apr 6, 2015
validate.c Complete support for HDR decompression, other improvements Apr 13, 2015

README.md

detex

Low-level library that can be used to decompress textures and texture blocks compressed using formats such as BC1/DXT1/S3TC, BC2-BC3, BC4/RGTC1, BC5/RGTC2, BC6 (BPTC_FLOAT), BC7 (BPTC), ETC1 and the ETC2 family.

It includes flexible pixel format conversion functions between a variety of formats, including several uncompressed formats and mapping HDR textures.

Additionally, loading and saving of KTX and DDS texture files is supported.

Included is a simple texture file viewer program as well as a command line utility to convert between texture file formats.

It has been developed using Linux, but is probably usable on other platforms without too much effort.