Documentation for version 1.1.1
Asset Store | Demo | Email | Forum
What is Soft Mask?
Soft Mask is a component for smooth masking of UI elements in Unity.
After adding to a Game Object, Soft Mask “masks” its child elements. Soft Mask gives a quite similar
effect as standard Mask and Mask Rect 2D but has some advantages over them.
● Unlike Rect Mask 2D, Soft Mask supports rotation of the mask and renders it with
anti-aliasing.
● Unlike Mask, Soft Mask supports transparency, which allows you to create smooth
transitions from visible to invisible parts of the image, as well as use inclined or rounded
edges of UI elements.
Soft Mask
Standard Unity’s Mask
(notice visual artifacts on the rounded
corners caused by cutoff)
Features
● Ease of use
: just place it on a parent element in the same way as standard Mask. There’s no
need to assign special materials or modify the masked elements in any other way.
● Support for Image, Raw Image, Sprite or Texture
: use the Image or Raw Image components
as a mask. Or set the Sprite or Texture directly to the Soft Mask.
● Custom shader support
: support Soft Mask in your shaders by adding just a few lines to the
shader code.