-
Notifications
You must be signed in to change notification settings - Fork 19
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
Heavy blocking/opaque spots/sawtooth effect in translucent BC7 textures with gradients #2
Comments
Here is the original sample in lossless PNG format, as well as both results: I'll also paste the original command-line output in case looking at the PSNR is useful: Click to expand!
Let me know if I can help, and thanks again. |
Here are the Click to expand!
Resulting file: |
Yes - you have identified BC7's key weakness. All encoders I've tried will suffer from this problem with alpha channels. BC3 won't because it always separately encodes alpha. There is a feature in BC7E that you can try that may help: See the info in the README file. I will expose these options to the command line tool when I work on it again. To use this feature, after you call one of the profile selection functions This array contains a per-component error weight multiplier that's Setting these values higher than 1 will cause the encoder to use modes 4/5 more |
Thanks for the detailed response, @richgel999. Makes a lot of sense. Looks like even vanilla Here's the command-line and output with the various stats: Click to expand!
|
Here are the resulting test files, for completeness: I'll think for a bit about these artifacts, maybe I'll try steeper weights. In the worst case I'll pay the price and store the alpha separately, or something. In any case I have learnt a thing or two today, that's for sure. It's been instructive. |
Sorry, my comment was for BC7E: This is my best BC7 encoder. |
Yeah, and even vanilla The Windows executable is still called |
Hi, @richgel999. Thanks for the great compressor and your work along the years.
This issue isn't something new, because AMD Compressonator suffers from the exact same artifacts, and I know some kind of degradation is to be expected. There are format limitations and the RGB part may be eating all the bits.
I find it interesting that, while lower quality, using an older BC3 compressor produces a much more coherent image. Because I don't know if this is an isolated/edge case I figured bringing it up and posting actual samples would help. ¯\_(ツ)_/¯
Here's
bc7enc
's unpacked alpha:Here's the result on a white background:
Here are the AMD Compressonator 4.0.4855 results, with their staircasing counterparts:
Or, who knows, maybe I'm using it wrong. The problem doesn't look that ugly on a gray or checkerboard background, but it's really apparent against bright and contrasty gradients.
Between the curve, the sudden color and alpha changes and all the noise these logos may be a tough case. On my end of the content pipeline I think they'll have to live uncompressed for now. They don't pass the quality check.
The text was updated successfully, but these errors were encountered: