-
Notifications
You must be signed in to change notification settings - Fork 1
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
Image-based lighting #21
Conversation
The harder but nicer (for.me) thing to do might be to write my own bc6h decompressor. The format is atleast bit-exact. Links: https://docs.microsoft.com/en-us/windows/win32/direct3d11/bc6h-format#decoding-the-bc6h-format https://github.com/hglm/detex/blob/master/decompress-bptc-float.c |
Fun fact: ASTC also supports HDR data according to https://themaister.net/blog/2021/08/29/compressed-gpu-texture-formats-a-review-and-compute-shader-decoders-part-3-3/. We could theoretically use that as the format for IBL images and decompress to fp16 on desktop. It'd ideally use a compute shader though. |
Re: decoding bc6h textures for mobile GPUs, here's what I've tried so far:
What I might try is converting https://github.com/Themaister/Granite/blob/master/assets/shaders/decode/bc6.comp to a full-screen fragment shader. This might be the best thing to do anyway because it'd be using gpu multithreading. |
This worked! |
Closes #4.
We need a way to transcode BC6H formats on mobile. https://github.com/KhronosGroup/BC6H-Decoder-WASM seems decent.