I have an image and a convex polygon defined by an array of x,y coordinates.
How would I go about getting a Texture2D representation of the part of the image encompassed by the polygon?
Basically I just need a texture from the image with the part outside the polygon made transparent.
If the resultant texture were also clipped to the width and height of the polygon I'd do backflips.
Any pointers/snippets would be appreciated. Thank you!