I need a solution for masking sprites like GUI Clipping mode or this in Unity.
I found this solution but it uses discard; and it masks everything. Also results are not smooth as I want.
Maybe It is possible by using a second texture with alpha for sprite shader? But I have no idea how to implement it. I couldn’t find anything similar on shadertoy(such a terrible site ).
Does anyone has a solution for sprite base(not for everything) masking (with shader+stencil perhaps)?