   Having trouble with a textured quad
  I'm trying to make a 2d textured quad function using direct3d that lets you specify each corner coordinate separately. As you can see on the image below, the texture should smoothly go from larger width at the top, to the smaller width at the bottom, which it doesn't do.  What is happening, and how can I fix this?
  Direct3D doesn't know about the overall shape of the quad, it is treating both triangles totally separately.The technique you're looking for is called "texture projection" (or "Projective texture mapping"). The whole issue is quite complex (lots of algebra involved), so try looking for some articles on the net, they should explain thins better than I could.   ;  The problem is that quads are split into triangles before they're textured/rendered.  So long as the two triangles are identical, there is no real distortion:--------------------|\  |    /|  /| \ |   / | /|  \|  /  |/|   \    | /   |    /|    \   |/    |   /|\  |    /|  /| \ |   / | /|  \|  /  |/---------- ----------Both of those quads are deformed in such a way that the triangles are identically shaped and sized.  Now look at this one:-----------------\    /| \  / |  \/  |   \   /   |    \ /    |\    /| \  / |  \/  |   ---------The way that one is deformed, the upper triangle is much larger than the lower triangle, but it still uses half the texture, so you get the effect seen in your screenshot.I don't know how to fix it other than compensating for the effect in the texture itself.  That requires knowing the geometry before hand, though.;  Ok, thanks! Looks like this isn't going to be so easy to fix.  I'll se what I can find using google.   