Texture coordintes for a polygon and a square texture
-
04-10-2019 - |
Question
basically I have a texture. I also have a lets say octagon (or any polygon). I find that octagon's bounding box. Let's say my texture is the size of the octagon's bounding box. How could I figure out the texture coordinates so that the texture maps to it. To clarify, lets say you had a square of tin foil and cut the octagon out you'd be left with a tin foil textured polygon.I'm just not sure how to figure it out for an arbitrary polygon. Thanks
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow