r/UnityHelp • • Jan 26 '23

HELP: Feathered Sprite Mask

Feeling like a real noob again. I'm trying to create a feathered, circular sprite mask, so the opacity is lessened at the outer edge of the circle, making masked objects barely visible before disappearing outside of the mask, and fully visible toward the center. Thanks!

2 Upvotes

5 comments sorted by

2

u/MischiefMayhemGames Jan 26 '23

A few months ago I was looking for a way to do that and discovered that unfortunately there is not a built in solution. Your best bet is probably doing something via Shader Graph and URP. Probably taking in a mask and multiplying its alpha by the your sprite's alpha or some such.

This was the closest I found to talking about it.

https://forum.unity.com/threads/feathered-soft-sprite-mask.498764/

1

u/[deleted] Jan 27 '23

Thanks for getting back to me! I gave this a shot with no luck, but I will keep trying. If I have any success, I'll let you know.

1

u/[deleted] Jan 27 '23

So, I ended up kind of gaming it, but achieved the effect I wanted (mostly). In PS, I created a circular fade .PNG with the transparent point at the center, and smacked that onto my circle sprite mask in Unity. Not how I wanted to do it, but it looks the same. Thanks again!

2

u/MischiefMayhemGames Jan 28 '23

Glad you found something that worked (well worked enough). Sometimes close is all we can manage. It would be awesome if Unity adds a feathered Sprite mask at some point.

2

u/aum-sohoni-1110 Dec 18 '23

thanks this saved my ass