-
Notifications
You must be signed in to change notification settings - Fork 453
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
Need a function to decode a single pixel #562
Comments
You could pretty easily do the decompression of a single block with the existing library. You just need to fix up the |
Good point. I have something working that I'll share or maybe make a pull request for, once I finish testing. |
This needs to support mips and isn't pull request ready as is, but might be useful for other people to follow along with.
|
Here's a version that takes mips into account and seems to work for me. It would be nice if there were a function like this in the API, that would give you a specific pixel value, from whatever type of texture / format you had, or perhaps a rectangle of pixel values if people would get use out of that.
|
Thanks for this excellent library!
In a graphics development / debugging application (https://github.com/electronicarts/gigi/) we have a feature where a user can click on a pixel of an image being shown in a debug context, and the UI will show the value of the pixel.
This is done by reading back the resource and displaying the values under the pixel.
This works fine for uncompressed formats, but for compressed formats, it's decompressing the entire texture.
It would be really nice if there was an interface where you could ask for a single pixel, and it could internally do the minimal amount of work needed to get the value - like maybe decoding the single block containing that pixel.
I found this library which can help, but it doesn't support BC6, and it would be nice to use your library, as I'm using it to load and save dds images.
https://github.com/richgel999/bc7enc
Thank you!
The text was updated successfully, but these errors were encountered: