Closed GoogleCodeExporter closed 9 years ago
Thanks for the detailed investigation! What you are seeing is a slight behavior
change in the tools. Previously, when using DXT1a we used to round the alpha
toward the nearest endpoint, either 0 or 255. Now we always round up, so if the
input value is not 0 it becomes 255. In the input texture there are some texels
that have small non-zero values, which is what causes the artifacts.
The solution is to enable alpha quantization prior to compression. It seems
that nvcompress does that already, so I think there may be a bug there.
Original comment by cast...@gmail.com
on 17 Aug 2012 at 6:45
The code actually looks good, I think what you are seeing is the result of
dithering. The alpha values on that area are very close to zero, but the error
of approximating them with zero adds up and introduces an opaque pixel once in
a while to compensate. The dithering algorithm is certainly not the best, but
works OK in most cases. Fixing the input texture should solve your problems. If
you would like to disable dithering, you can do so by setting the second
argument of setQuantization to false:
compressionOptions.setQuantization(/*color dithering*/false, /*alpha
dithering*/true, /*binary alpha*/true, 127);
Original comment by cast...@gmail.com
on 17 Aug 2012 at 6:58
Hello!
I'm set "alpha dithering" to false and same artifact in texture is disappear.
Thank you very match!
Original comment by a_kelma...@wargaming.net
on 21 Aug 2012 at 6:56
Original issue reported on code.google.com by
a_kelma...@wargaming.net
on 17 Aug 2012 at 7:25Attachments: