-
Notifications
You must be signed in to change notification settings - Fork 450
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
BC7 (no GPU) compresses (255,255,255,0) to (255,255,255,1) #269
Comments
When I run the CPU-compressor on the latest version of the library, I get a block (as decoded by
And it's getting decoded as (255,255,255,0). |
Hi, thanks for responding! I didn't know about that ability in texdiag, but that's useful. I don't know understand BC7 compression enough to know how to interpret those values, but I definitely see a non-zero value in the alpha channel for me visually (that's how I discovered the issue) and I see a 1 when I look at the texture in the ways that I know how to quantitatively:
If you drag and drop the DDS into Visual Studio and use a color picker do you see (255,255,255,0)? I see (255,255,255,1). If I were to speculate what the output of texdiag means, since it shows 0.004 for both A0 and A1, and 0.004*255=1.02, are you sure that it doesn't confirm what I am seeing that the value is (255,255,255,1)? Just as a comparison, this is what texdiag outputs when I use GPU compression and where I get the desired (255,255,255,0):
There A0 and A1 both show 0, which seems to fit with what I am seeing empirically. |
I see the '0.004' vs. '0.0`` issue is there. It's probably more prominent for alpha than color. I suspect the difference here is that the GPU compressor operators on UNORM formats while the CPU compressor uses floating point. Not quite sure how I'd fix this, but I'll keep it open. |
An image with a block of fully transparent white texels is getting compressed to white texels with an alpha value of 1 instead of 0.
To reproduce:
Note that if GPU compression is used the compressed values are the expected (255,255,255,0), and so the undesired alpha value only happens with non-GPU compression.
The text was updated successfully, but these errors were encountered: