Skip to content
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

Add support for alpha edge extrudes when using -a option #431

Open
solidpixel opened this issue Aug 29, 2023 · 0 comments
Open

Add support for alpha edge extrudes when using -a option #431

solidpixel opened this issue Aug 29, 2023 · 0 comments

Comments

@solidpixel
Copy link
Contributor

solidpixel commented Aug 29, 2023

The current compressor struggles to compress hard edges in images with fast transparency changes when the backing RGB color in the transparent region is totally different to the non-transparent color (e.g. black). This can cause block artifacts along the transparent edges in the image.

The usual fix for this is to extrude the non-transparent edge color in to the transparent region, minimizing the magnitude of the color diff that must be represented. The current compressor requires users to manually pre-extrude their textures prior to compression, which many DCC tools can do, but we can probably do something specifically format-aware based on e.g. choosing a current partition endpoint color or the average of them.

We could do this automatically when using the -a option, but should also add an explicit enable/disable flag so users can control whether this optimization is applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant