Closed Athosvk closed 1 year ago
Ideally we do this in ISPC which will come in a later PR, but this is a good start.
Why wasn't this implemented as ISPC code from the get-go? As it appears to purely be a post-process without affecting the downscaling algorithm that completely defeats the purpose of this algorithm living inside this crate, and should be provided as a separate standalone operation instead.
This makes it so that downsampling of images does not fully diminish the alpha channel (for alpha cutoff textures). This is essentially a port of the implementation in nvdia texture tools.
Ideally we do this in ISPC which will come in a later PR, but this is a good start.