Jump to content

  • Log In with Google      Sign In   
  • Create Account

D3D Texture Coordinates


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 ikklit   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 February 2000 - 05:37 PM

Hi all, I''ve got a really simple question, but for me it is currently one of those things that I keeps me awake at night and bashing my head against the wall in my waking hours. Here it goes: how exactly does the u and v coordinates work? At the current point in time it is a hit and miss afair. According to the documentation, u = sx - o v = sy - o When I do mapping to a rectangle with ulc (-5, 1, -5) and lrc (-4, 0, -5) and work out the u and v mappings according to the coordinates it the textures are turned upside-down. (normal for this is (0, 0, -1)) Now, thinking fast, I changes all u 0''s to 1''s and all v 0''s to 1''s and the texture is placed correctly. Until I view the square from the back... The back used to be all scew, but I seem to have fixed it by the order in which I place the vertexes, i.e. u,u in the order (0, 0), (0, 1), (1, 0), (1, 1). The back is the correct side up, but seems to start in the middle. (Some progress have been made...) Obivously when I do squares in the z plane (y = constant) I get some different results. I''m missing something seriously here, how exactly and in what order in the u and v coordinates supposed to be used? I need an understanding around this - at this moment it seems like a black-magic affair to me. Thanks in advance for the help, ikklit

Sponsor:

#2 ikklit   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 February 2000 - 06:22 PM

Me again,

I''ve just read a post of the DirectX mailing list in which it seems that a recommended order of the vertexes, in u,v format might be:

(0, 0)
(1, 0)
(1, 1)
(0, 1)

I don''t know if this has something to do with the problems I''m having. Maybe my order is just totally screwed up. The more I learn, the less I know Seems like I''m really lacking understanding.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS