2D Toolkit Forum

2D Toolkit => Support => Topic started by: rylgh on December 19, 2013, 08:12:51 am

Title: alpha masking sprites
Post by: rylgh on December 19, 2013, 08:12:51 am
Hey,

I'd like to mask off part of sprites with the contents of another sprite.

So for example I've got this sprite (http://i.imgur.com/HXWHYzB.png) and I'd like to mask it with this one (http://i.imgur.com/3WoP8Xy.png)
so that this is the result (http://i.imgur.com/U0MRp6N.png)

Is this possible, and if so how would I go about it? I'm not experienced with shaders so I may be missing an obvious method.
Thanks!
Title: Re: alpha masking sprites
Post by: unikronsoftware on December 19, 2013, 11:49:35 pm
There is a shader posted here which should do the job.
http://2dtoolkit.com/forum/index.php/topic,1700.0.html