- Home /
How to use a mesh as a sprite mask
I'm generating a mesh to use as 2D terrain which can be changed to show destruction. I'd like to instantiate a "scorch mark" sprite where an explosion happens but have it only show up on the terrain.
Essentially, I'd like to use the terrain mesh instead of a sprite in a sprite mask. How can I do something like this?
Answer by DarthKarki · May 22, 2018 at 03:54 PM
I set up a second camera rendering to a texture and then added a second texture slot to my terrain shader for this texture. I just instantiate the explosion sprite in front of the second camera and it will only show up on the terrain:
Your answer
Follow this Question
Related Questions
Dynamic sprite mask 1 Answer
Mask a Sprite with multiple SpriteMasks? 1 Answer
Sprite doesn't show on Canvas, can't change to Image because I need Sprite Renderer component 0 Answers
Masking a MeshRenderer 0 Answers
How to get masked sprite? 1 Answer