Hello Guest

Author Topic: Polygon UI mask possible?  (Read 4097 times)

Babaganoosh

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 17
    • View Profile
Polygon UI mask possible?
« 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!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Polygon UI mask possible?
« Reply #1 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.