FREE TRIAL

|

☀
☾

Clip Masks

Clipping/Masking in Nova is accomplished using the ClipMask component, which clips content performantly without using the stencil buffer. It supports the following features:

  • Clip to Rectangle
  • Clip to Rounded-Corner Rectangle
  • Clip to Texture
  • Color Tinting or Fading

Clip to Rectangle

To apply a clip rect to a UIBlock and its descendants, simply add a ClipMask.

Clip to Rounded-Corner Rectangle

If the UIBlock on the GameObject with the ClipMask is a UIBlock2D, the clip rect will round using the corner radius of the UIBlock2D.

Clip to Texture

To clip using a texture mask, simply set mask to the desired texture. Mathematically speaking, the final rendered color is calculated as:

finalColor = blockColor * clipMaskTextureColor;

Color Tinting

A ClipMask will multiply the final rendered color of all UIBlocks by its tint like so:

finalColor = blockColor * clipMaskTint;
☀
☾
In This Article
Legal EmailContact Github
Copyright © 2022 Supernova Technologies, LLC