New Sprite type supporting alpha channel #2286
Unanswered
Tarzan1163
asked this question in
New processor/display support or capability request
Replies: 2 comments 1 reply
-
Adding an alpha channel to sprites is on the TO DO list but it will be some time before it gets added. This capability would then allow masking/transparency/opacity features. |
Beta Was this translation helpful? Give feedback.
1 reply
-
I've been thinking on this. You could create two sprites, one for your image, and a grayscale one, from alpha channel, for your mask. Then interpolate. I'll give it some more thought and try to create a demo. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
In my project a have sprite that holds some antialiased graphic. Part of this graphic is repainted with transparent color (masked). However when i push this sprite to another sprite, then part with alpha is already premultiplied and thus antialiased parts are useles.
I cannot paint directly into destination sprite because of that masking step.
Use case
Solution
Introduce sprite that holds alpha and blending with background color is done only when pushSprite() or pustToSprite() is called.
Would it be possible to add such sprite type into library?
Beta Was this translation helpful? Give feedback.
All reactions