KTX-Software icon indicating copy to clipboard operation
KTX-Software copied to clipboard

Scale filter preserving alpha coverage

Open lexaknyazev opened this issue 4 years ago • 1 comments

To properly support textures used for alpha-cutoff workflows, the mip scaler has to support an algorithm that preserves alpha coverage.

See http://the-witness.net/news/2010/09/computing-alpha-mipmaps/ for the implementation details.

lexaknyazev avatar Oct 04 '21 10:10 lexaknyazev

Also see https://bgolus.medium.com/anti-aliased-alpha-test-the-esoteric-alpha-to-coverage-8b177335ae4f for a good explanation of alpha to coverage and the background behind this request. This article also has example shader code to scale the alpha by mip level which essentially does the same as is being requested be done by this RFE during mip generation.

That said, libktx currently uses the resampler from Basis Universal so a request should be opened there too.

MarkCallow avatar Oct 07 '21 08:10 MarkCallow