Skip to content

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

Description

@solidpixel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions