6 releases (3 breaking)

0.4.0 May 3, 2024
0.3.1 May 1, 2024
0.3.0 Jan 4, 2024
0.2.2 Apr 5, 2023
0.1.0 Mar 15, 2022

#2 in Rendering engine

Download history 1778/week @ 2024-07-27 1781/week @ 2024-08-03 1543/week @ 2024-08-10 1884/week @ 2024-08-17 2560/week @ 2024-08-24 1204/week @ 2024-08-31 1323/week @ 2024-09-07 2043/week @ 2024-09-14 2055/week @ 2024-09-21 2124/week @ 2024-09-28 2759/week @ 2024-10-05 2550/week @ 2024-10-12 2249/week @ 2024-10-19 1952/week @ 2024-10-26 2493/week @ 2024-11-02 2826/week @ 2024-11-09

9,947 downloads per month
Used in 3 crates

MIT/Apache

31MB
1.5K SLoC

Contains (static library, 7.5MB) libkernelx86_64-unknown-linux-gnu.a, (static library, 5MB) kernelx86_64-pc-windows-msvc.lib, (static library, 6MB) src/ispc/libkernelx86_64-apple-darwin.a, (static library, 3MB) libkernel_astcx86_64-unknown-linux-gnu.a, (static library, 2MB) kernel_astcx86_64-pc-windows-msvc.lib, (static library, 2MB) libkernel_astcx86_64-apple-darwin.a and 15 more.

Rust bindings for ISPC Texture Compressor

Latest version Documentation CI MIT APACHE2 Contributor Covenant

Banner

About

This is a forked crate from from Graham Wihlidal's rust bindings repo for the ISPC texture compressor. The fork includes updates to the latest Intel ISPC texture compression, as well as some patches that were required to make it useful in production.

State of the art texture compression for BC6H, BC7, ETC1, ASTC and BC1/BC3.

ISPC and libclang are not required, unless regenerating the ISPC kernels:

$ cargo build --features=ispc

For convenience, ISPC binaries for macOS, Linux, and Windows are in the repository (but not the crate).

Additionally, libclang exists in the LLVM installer for Windows, also included. https://github.com/gwihlidal/intel-tex-rs/tree/master/dependencies

Supported compression formats:

  • BC1, BC3 (aka DXT1, DXT5) and BC4, BC5 (aka ATI1N, ATI2N)
  • BC6H (FP16 HDR input)
  • BC7
  • ETC1

Pending compression formats:

  • ASTC (LDR, block sizes up to 8x8)
    • Work in progress

Usage

Add this to your Cargo.toml:

[dependencies]
intel_tex_2 = "0.4.0"

Example

$ cargo run --release --example main

Width is 4096
Height is 4096
ColorType is RGB(8)
Converting RGB -> RGBA
Block count: 1048576
Compressing to BC7...
  Done!
Saving lambertian.dds file

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Contributions are always welcome; please look at the issue tracker to see what known improvements are documented.

Code of Conduct

Contribution to the intel_tex_2 crate is organized under the terms of the Contributor Covenant, the maintainers of intel_tex_2, Traverse Research BV, promise to intervene to uphold that code of conduct.

Dependencies