Author Topic: Masking Via Depth Cutout  (Read 6216 times)

Bartleby

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Masking Via Depth Cutout
« on: April 16, 2013, 11:07:11 AM »
Is there a way to "limit" the effect of a mask texture or to make it only affect the contents of a single panel? Using a UITexture with the Unlit/Depth Cutout shader works great if there's nothing behind whatever's being masked, but in some situations, I want to have something behind the masked sprite.

Quick example: A little character tag with a background, a portrait, and a mask to make the portrait a circle. I want the mask to *only* mask the portrait, not the background. As is, it'll mask the portrait, the background, and anything else on the same layer.

(I realize that that particular thing could be accomplished by putting a hole in the background and plopping the portrait sprite behind it; this is a more general question.)

Thanks!