I have an image and a mask.
I'm blending using a render target to achieve this effect:
> i.imgur.com/0FcbnKC.gif
But now when I use an image that is transparent on the edges, I cannot get the same effect.
> i.imgur.com/hlteD0Y.gif
How can I make it so the white parts don't show? (So I only see the character getting clipped by the mask)
Thanks!
ps. I've attached a test project used to make the two demos.
zip
zip
Comments
Your code doesn't work as you would expect because Gideros discards fully transparent pixels early in the rendering pipeline, so they don't get blended at all and screen isn't updated for those pixels.
You can overcome this by redefining the shader program associated with your 'image', so that transparent pixels are no longer discarded.
See my code below: