Skip to content

[ts] pma on upload for textures#2995

Closed
davidetan wants to merge 5 commits into4.3-betafrom
pma-on-upload
Closed

[ts] pma on upload for textures#2995
davidetan wants to merge 5 commits into4.3-betafrom
pma-on-upload

Conversation

@davidetan
Copy link
Collaborator

This PR adds support across all runtimes for premultiplying non-PMA textures on upload.

The advantages are:

  • All PMA benefits also apply to non-PMA textures
  • Compressed WEBP can use PMA features (since non-PMA textures are premultiplied on upload)
  • The code is simplified:
    • Users no longer need to pass any PMA settings
    • No need to branch color calculations based on PMA, since everything is PMA (most libraries/runtimes use PMA)

If merged, we need to update all TS-related documentation by removing the PMA settings and mentioning that non-PMA and PMA textures can be used interchangeably.

this.pathPrefix = pathPrefix;
this.downloader = downloader;
this.cache = cache;
constructor (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Davide, code janitor.

@davidetan davidetan closed this Dec 12, 2025
@davidetan davidetan deleted the pma-on-upload branch December 12, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants