Texture mapping is done by evaluating hyperbolic equations, i.e.Raqia said:Since the location of the samples textels depends on the perspective of the polygon in question, z-values or some information about perspective must be involved...
U_pixel = (A * X + B * Y + C) / (P * X + Q * Y + R)
V_pixel = (D * X + E * Y + F) / (P * X + Q * Y + R)
where X and Y are the coordinates of the screen pixel, and the nine constants, A,B..F,P,Q,&R are evaluated during triangle setup from the X,Y and 1/W positions of the vertices and their associated U&V values.
In a sense the "/ (P * X + Q * Y + R)" is typically encoding the perspective depth but it doesn't have to be.