What do correct texture coordinates look like?
The answer depends on which API it is (Direct3D or OpenGL) and on what kind of texture it is. Direct3D addresses texels at their top-left corner. OpenGL addresses texel centers. In OpenGL, most texture coordinates are normalized to the range (0..1) in each dimension, with the exception that texture rectangles (GL_TEXTURE_RECTANGLE_ARB) use unnormalized coordinates ranging from (0..width, 0..height). The centers of OpenGL texels along the diagonal of a GL_TEXTURE_RECTANGLE_ARB are therefore(0.5, 0.5), (1.5, 1.5), (2.5, 2.5), etc. (To see this try writing WPOS to the output of a shader on a screen-aligned quad.) To get the corresponding texture coordinates for GL_TEXTURE_2D textures, you have to normalize them, meaning you divide by width and height. For a 4-by-4 GL_TEXTURE_2D, that would give us texel centers along the diagonal of (0.125,0.125), (0.375,0.375), (0.625,0.625), and (0.875,0.875). Direct3D texture coordinates are always normalized, so the corresponding Direct3D texel center