Our game has a number of sprites using SpriteRenderer that are masked with a SpriteMask. The sprites are organized with sorting groups and sort order, etc. This works well.
Now we need to attach a dynamic text display to some sprites. We can do this using TextMesh or the Text Mesh Pro text mesh, or even attaching a small Canvas in world space and using a Text UI component. All of these draw the text fine but none of them will respect the SpriteMask. How can we mask the text without a radical re-vamp of our game? Can this be done using a custom shader and if so, how?