How do you calculate UVW coordinates?

Posted by Jenko on Game Development See other posts from Game Development or by Jenko
Published on 2011-11-17T15:22:25Z Indexed on 2011/11/17 18:10 UTC
Read the original article Hit count: 355

I'm working on a 3d engine and I'm calculating UVT coordinates, where U and V represent pixels on the texture measured in 0-1, and T is:

T = perspective / Z

But I'm trying to use this perspective-correct triangle rasteriser, which requires a W, per vertex. How do I calculate the W for each vertex for the drawPerspectiveTexturedPolygon() function?

Hint: The code comments refer to W as the "homogenous coordinate" ... does that mean anything?

© Game Development or respective owner

Related posts about 3d-engines

Related posts about triangles