comptex is a Rust GDExtension workspace that implements a texture pipeline using:
- Godot GPU texture formats (BC7/ASTC/ETC2) at import time
- GDeflate tile-stream compression for on-disk payloads (default storage codec)
- QOT compression for texutres
- CPU decompression path (complete)
- GPU decompression interface (with compute-shader scaffolding and CPU fallback)
.comptex v2 headers add an explicit payload_codec field (GdeflateTileStream, Qot1, or Qot2). v1 files remain supported and imply GDeflate.
crates/libgdeflate-sys: raw FFI bindings to NVIDIA's libdeflate forkcrates/comptex-format:.comptexand TileStream format typescrates/comptex-codec: safe compress/decompress APIcrates/comptex-godot: Godot-facing integration helpers
Initialize the NVIDIA codec dependency:
git submodule update --init --recursiveThen build:
cargo buildUse the workspace xtask helper for common development flows:
# Build comptex-godot (debug)
cargo run -p xtask -- build
# Build comptex-godot (release)
cargo run -p xtask -- build --release
# Run all workspace tests
cargo run -p xtask -- test
# Run comptex-codec benchmarks
cargo run -p xtask -- bench
# Build benchmark binaries without running them
cargo run -p xtask -- bench --no-run
# Bundle a copy-ready Godot addon folder at dist/addons/comptex
cargo run -p xtask -- bundle
# Bundle release addon to a custom directory
cargo run -p xtask -- bundle --release --out-dir dist/addons/comptexbundle generates:
addons/comptex/comptex.gdextensionaddons/comptex/lib/<platform>/<dynamic-library>addons/comptex/plugin.cfgaddons/comptex/plugin.gd
A draft benchmark project is available at examples/godot-bench.
Bundle addon files directly into that project:
cargo xtask bundle --release --out-dir examples/godot-bench/addons/comptexThen place benchmark assets in examples/godot-bench/assets/ and open the project in Godot.
Compression/decompression micro-benchmarks are available for comptex-codec:
cargo bench -p comptex-codecThe benchmark covers multiple synthetic datasets (zeros, pattern, mixed), sizes (1 MiB, 8 MiB), GDeflate compression levels, and QOT1/QOT2 encode/decode.
In the Comptex importer (lossless preset), set Payload codec to GDeflate_TileStream (default), QOT1, or QOT2. QOT1 and QOT2 are only valid with Lossless (RGBA8); VRAM BC3/BC7 presets always use GDeflate.
MIT. See LICENSE.