Bug 373337 - Add blending mode to copy red channel to transparency
Summary: Add blending mode to copy red channel to transparency
Status: REPORTED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-06 06:46 UTC by Spencer Brown
Modified: 2020-06-08 13:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Spencer Brown 2016-12-06 06:46:17 UTC
I've been meaning to add this feature for a while and just haven't gotten around to it yet.

A lot of game engines expect greyscale textures to be packed into multiple channels to save texture memory. Copy red, copy green, and copy blue are very convenient ways to do this for the color channels, but they don't help pack a greyscale mask into the alpha channel. With DXT5 compression the alpha channel is compressed separately so it's a good choice for masks that have high-frequency data or data that doesn't change along with the other masks.

This blending mode would copy the contents of the red channel to the alpha channel, eliminating the need to copy your alpha channel mask merged and convert it to a transparency mask every time you change the alpha mask. Putting the red channel into the alpha channel is also useful for DXT5 normal map compression which is still used sometimes for compatibility reasons.
Comment 1 Tiar 2020-06-08 13:38:36 UTC
There are a lot of features regarding reading and writing transparency. I might be worthy to check if, while the feature is still not implemented, this request is still valid and the feature still needed.