Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support BC6 and BC7 #4

Open
kvark opened this issue May 24, 2023 · 1 comment
Open

Support BC6 and BC7 #4

kvark opened this issue May 24, 2023 · 1 comment

Comments

@kvark
Copy link

kvark commented May 24, 2023

It would be great to implement support for these. I know it's very involved, and also already planned (based on the README). Current alternatives are scarce - basically bind to the monster of Intel Compressonator, which is it's own language and compiler, as well as a giant non-Rust dependency to carry. Has there be any attempt to implement a BC6/BC7 compressor? Even something bare-bones, to iterate on later, would be good.

For the context, I'm happily using texpresso to cook textures from user facing formats to BCn in Blade. The output of texpresso is cached on disk, so that loading can be instantaneous - just read from disk into GPU memory without any further processing. Now I need support for environment textures (coming in as EXR), and BC7 is the target. Thank you for the awesome work, and I hope to see texpresso grow!

@jansol
Copy link
Owner

jansol commented May 24, 2023

I was planning to start by transcribing the MIT/PD bc7enc for BC7. For BC6 the best starting point is probably bc6h_enc. Alternatively bc7enc_rdo could be worth a look for all BC formats, but that might require a license change in texpresso.

As an alternative I have been looking into compiling CMP_Core, i.e. the actual BCn compressor from Compressonator as a -sys crate and create safe bindings for it. (that would probably be a different project though, since it'd no longer be pure rust)

My attention has lately been more on getting the existing code to build with rust-gpu though so if you have time, any help with adding more formats is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants