Original Post
Hi, I got a tri and it's U and V coordiantes, plus I also have the world-space intersection point and what I think is barycentric coordiantes of the of the intersection point. now I'd like to get the U and V for the intersection point. One idea I have is: a triangle ABC, hitpoint H. Construct a line that lies on A and H and calculate it's intersection D with the opposite edge BC. Now I interpolate BC to get U and V for D, then interpolate A and D to get U and V for H Seems to be quite an intuitive solution, but I guess there must be something faster (considering how many times this will be done). I've googled for some solutions, but most sutff points to texturing and rasterizing in D3D or OpenGl. I know a regular engine would interpolate along the edges and then along the scanlines, but I'm writing a raytracer (seems everybody is writing a raytracer lately ;)) and don't think calculating the edge U and V for the scanline I'm doing is a good method since it lacks in flexibility.