Skip to content

jansol/texpresso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A pure Rust texture compression suite

This library started out as squish-rs, a pure rust port of Simon Brown's libsquish but was forked and renamed to avoid confusion as the API and format support is expanded beyond the original C++ library.

Crates in This Workspace

  • lib: texpresso - The library itself
  • cli: texpresso_cli - A command-line utility for compressing and decompressing textures, also serves as a usage example for the library. Note that the actual executable is also called 'texpresso'.

Roadmap

Library

S3 Texture Compression formats

  • DXT1 aka BC1: 8bpc RGB with optional binary alpha
  • DXT3 aka BC2: 8bpc RGB with paletted alpha
  • DXT5 aka BC3: 8bpc RGB with interpolated alpha

3Dc variants / RGTC (Red-Green Texture Compression)

  • ATI1 aka RGTC1 aka BC4: 8-bit grayscale
  • ATI2 aka RGTC2 aka BC5: two 8-bit channels

Direct3D 11 additions / BPTC (Block-Partition Texture Compression?)

  • BPTC_ALPHA aka BC6h: 16-bit HDR RGB
  • BPTC aka BC7: 8-bit RGB with optional alpha

Ericsson Texture Compression (common in mobile chips)

  • R11_EAC: 11-bit grayscale
  • RG11_EAC: two 11-bit channels
  • ETC2: 8bpc RGB
  • ETC2_EAC: 8bpc RGB + 11-bit alpha
  • PUNCHTHROUGH_ALPHA1_ETC2: 8bpc RGB with punchthrough alpha

Adaptable Scalable Texture Compression (common in modern mobile chips)

  • the texture compression format to end all texture compression formats
  • needs further investigating due to vast complexity and e.g. supporting non-square blocks
  • ASTC_LDR
  • ASTC_HDR

Compatibility / ease of use

  • no_std
  • support compiling for GPU targets via rust-gpu
  • Support 1-4 input channels without requiring padding in the calling code

CLI

non-texture formats

  • Read PNG
  • Read JPG
  • Write PNG

Containers for compressed textures

  • Read DDS
  • Write DDS
  • Read KTX
  • Write KTX
  • Read KTX2
  • Write KTX2

Target platforms

  • Support encoding on GPU via Vulkan

Maintenance

  • Migrate to clap 3

About

A pure Rust texture compression suite

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published