Vector images as masks

+1 vote
asked Mar 29, 2016 in Help by miro
Hi, Is it possible to use a vector image component as a mask? I'd like to use a custom shape for a button, and it's very important to have a proper quality for the mask graphic.

1 Answer

0 votes
answered Mar 29, 2016 by admin (31,720 points)
 
Best answer
Hi there, You can use a vector image as a mask, like you would with an image or text component. However, it may not be worth using at lower resolutions instead of an image, due to how unity's masking works - It's done via the stencil buffer, meaning that the edge pixels are either fully masked, or not at all. Currently, the only way around this would be to roll your own masking system. Hope that helps :)

PS: Is there a particular reason you want to use the vector image as a mask, instead of using the image itself?

~ Declan
Welcome to MaterialUI support! Ask us anything :)
...