Traverse-Research / ispc-downsampler

Image downsampler using a Lanczos filter implemented in ISPC
Other
11 stars 1 forks source link

🪥 #48 API cleanup #53

Closed KYovchevski closed 5 months ago

KYovchevski commented 6 months ago

In #48 we added an alternative downsampling path specifically for normal maps which renormalizes them and allows for format that have the Z-component reconstructed from X and Y. Also, due to our app using 4-channel texture for the normal maps during asset building, we needed to introduce a pixel stride parameter so we can correctly sample the normal maps.

This lead to several API changes which, in hindsight, were not done the best, such as exposing a mandatory pixel stride parameter for the downsampling function and the format getting separated from the Image struct because of the existence of two different format enums.

This PR attempts to correct these issues by doing a few things:

KYovchevski commented 5 months ago

Github didn't notify me of Marijn's comments until after I had clicked squash and merge. Thanks Github.