View Full Version : Texture Projection

10-19-2000, 12:45 PM

I am currently doing some texture projections by specifying the four texture coordinates, and I wanted to convert this using the texture matrix. The problem is that I cannot reproduce the results that I am having using the coordinates. The coordinates that I am using are based on the size of the quad that I am trying to project onto and there isn't a spatial transformation that I can do to the matrix to simulate this. Anyway, does anyone know how to derive a texture matrix given four sets of texture coordinates?


10-19-2000, 05:55 PM
Why not just specify a projective texture coordinate at each of the four vertices of your quad w/ glTexCoord4fv?

Note that you may have to tesselate to get the effect you want. Unless the 4 texture coordinates come out exactly right, you may see a line along the diagonal that looks like a perspective correction artifact but in fact is not.

- Matt