Reputation: 3460
How can I draw a rectangle texture as a 2d sprite with rounded corners, like this:
_____
/ \
| |
\_____/
I figured, i need to use a mask texture and a shader to make a circle mask but I can't apply shadermaterial to a 2d sprite!
Upvotes: 3
Views: 1891
Reputation: 17596
You can create a texture with drawing on a canvas or draw a texture you want in any image editor, then apply it to a sprite. If you want the sprite to have the same size, independent on distance, then look this answer. Both my answers have jsfiddle examples.
Upvotes: 1