# DirectX UV coordinates are flipped

I'm loading a simple model, which is composed of vertices that have position, normal and UV texture coordinates.

The thing is, displaying that model using DirectX 9 or 10 shows that the UV coordinates are wrong. In fact, if I manually edit the texture using Paint and flip it vertically, the result is ok.

Is something wrong with my loading routines? Using Visual Studio Graphics Debuggers shows that both the model and the texture are correctly loaded.

Do I have to flip the texture vertically when I load it, or just transform the UV coords with:

u = u;
v = 1 - v;


Also, as far as I know, OpenGL differs from Direct3D for the UV coordinates system. Would those coordinates be ok with OpenGL without any transformation?

• By default images are stored from top to down in memory. Yes, you have to flip every image (at least for openGL). Jul 27 '14 at 17:56
• This is an issue of face winding order. The UVS on the model are using one (Counter-clockwise or Clockwise) and the renderer is set up to use the opposite one. Jul 30 '14 at 2:47
• Sorry, winding would show up as a flip in U rather than a flip in V... I ran into this issue with CMOs (Right-handed models) vs. SDKMESH (Left-handed models). Jul 30 '14 at 3:48