custom shaped cutout shader

Hi!

I need to create a wall of profile pics, which will be in different shaped frames stars, hearts, circles…
Quick example is this:

So thought of using sprite mask and assign random mask texture, but then they all can be touched and dragged and mask set on 1 image collides with another.

So is there any shader available for cutting images using an input texture which will define the shape?

I will create materials which will be assigned randomly.

All covered in manual / learn section.

^ for me, it is not to be done in Canvas.
It has to be with spriterendrer and spritemask applied on one sprite effects the other while moving it around

hi, this is as close what I want, found this on community.
but I’m not well versed with shader programming, can you tell me if _MainTex can refer to the sprite currently in spriterenderer?

Shader "MaskedTexture"
{
   Properties
   {
      _MainTex ("Base (RGB)", 2D) = "white" {}
      _Mask ("Culling Mask", 2D) = "white" {}
      _Cutoff ("Alpha cutoff", Range (0,1)) = 0.1
   }
   SubShader
   {
      Tags {"Queue"="Transparent"}
      Lighting Off
      ZWrite Off
      Blend SrcAlpha OneMinusSrcAlpha
      AlphaTest GEqual [_Cutoff]
      Pass
      {
         SetTexture [_Mask] {combine texture}
         SetTexture [_MainTex] {combine texture, previous}
      }
   }
}

Ok, please close the thread. Used the shader above.
both texture can be updated using script.

renderer.material.mainTexture = Texture2D
renderer.material.SetTexture(“name”, Texture2D)