开发者

texture coordinates for point in polygon

开发者_StackOverflow社区I have a polygon, where each vertex has texture coordinates. How can I calculate texture coord for any point lying in the polygon? (I know points coordinates.) Thanks

p.s. sorry for my english...


I you don't care about perspective than it's simple enough. simply find the barycentric coordinates of the point and do a linear interpolation of the vertices texture coordinates. Here's a nice tutorial about this

If however you're trying to do this in a scene where with a perspective projection, you'll probably want to worry about perspective correction as well. Here's some reading about this issue

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜