2D Toolkit Forum

2D Toolkit => Support => Topic started by: Babaganoosh on February 02, 2014, 08:05:28 pm

Title: Polygon UI mask possible?
Post by: Babaganoosh on February 02, 2014, 08:05:28 pm
Hey Dinesh,

How does the tk2dUIMask work, is it just redrawing the pixels behind in to the front? Is it possible for me to create my own UIMask that accepts a polygon collider, or any tips? Thanks!
Title: Re: Polygon UI mask possible?
Post by: unikronsoftware on February 03, 2014, 11:09:17 am
The UIMask draws something and writes into depth - it does it at a forced time in the render pipeline, so it draws before the things that are meant to be clipped. You can replace it with any shape you like - its just a quad, but will work if you change the shape. Just keep in mind the z coordinate, thats what it uses to sort.