Original Post
The program that I am working on is eventually going to allow the user to paint directly on a 3d model. I have all the screen unprojection and ray intersection code done, and I can get the triangle that is intersected, along with the point at which it intersects. The question is, given the texture coordinates and position coordinates of a triangle, and the position coordinate of the intersection, what are the texture coordinates of the intersection?
I thought about taking the distances to all the points and weighting the tex coords according to their ratios, but that definately seems wrong.
Any ideas or pointers in the right direction?