kram icon indicating copy to clipboard operation
kram copied to clipboard

BC6H de/encoder

Open perludum opened this issue 2 years ago • 3 comments

Maybe this is an interesting candidate for a BC6H de/encoder (MIT license): https://github.com/GPUOpen-Tools/compressonator/tree/master/cmp_compressonatorlib/bc6h

BC6H would be a nice addition in kram.

perludum avatar Sep 26 '21 09:09 perludum

That one is probably easiest to integrate and it has encode/decode. I heard quality on Compressenator isn't the best, but having the format vs. not is important. NVTT and DXTex also have encoders. This one below is a GPU encoder, but I'm not sure I want to add the GPU dependency to kram yet. There's just too many encoder types to port, and I'd need a gpu abstraction on Metal and Vulkan/DX12. I also still need to feed hdr (fp16/fp32) data down to ASTC HDR and to BC6.

https://knarkowicz.files.wordpress.com/2016/03/knarkowicz_realtime_bc6h_gdc_2016.pdf

alecazam avatar Oct 02 '21 16:10 alecazam

The BC6H compressonator sources are in the explicit Xcode projects. I'm also starting to turn on basis for ktx2 thumbnail decode. But I don't have either of these connected in where needed. It took a while to separate BC6H sources.

alecazam avatar Oct 04 '21 03:10 alecazam

Compressonator BC6H are now connected up to the bc7enc path for expedience, but it's all LDR right now. ASTC HDR and BC6H need an HDR path where the fp16/fp32 mip data is fed into them. This code is also likely broken in the half <-> float conversions.

alecazam avatar Oct 10 '21 18:10 alecazam