Results 1 to 6 of 6

Thread: Texture coordinate, u,v and s,t,r... They are asme or not?

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2015
    Posts
    296

    Texture coordinate, u,v and s,t,r... They are asme or not?

    xture coordinate, u,v and s,t,r... They are same or in a differnt space?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2015
    Posts
    296
    Browsing the command glTexCoord2f(s,t), the parameters s and t are taking value out of texture with coordinate u, v. Thus, I think they are the same thing,

  3. #3
    Newbie OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,789
    They're just different names for the same thing.

    Modelling programs and D3D tend to use (u, v) whereas OpenGL tends to use (s, t) but it's just a naming convention. You could name them (x, y) or even (elephant, wombat) and so long as the same data is in there, everything would work.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Mar 2015
    Posts
    296
    So it is. name convention. But opengl books often name the texture coordinate as u,v, whereas when they deal with paramters in glTexCoord*(), they begin to use s,t...terminology, it is too arbitrary to strict.
    Thank you for your wonderful,interesting answer.

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    3,103
    Note that GLSL's vector member access uses s,t,p,q for the "texture" version (although you're free to use x,y,z,w or even r,g,b,a if you desire, so long as all members are drawn from the same group).

    Documentation consistently uses s,t,r,q, but r conflicts with r,g,b,a so they changed it for GLSL.

    The main problem with using u,v is deciding what the third and fourth components would be. Using u,v,w would be fine if we only needed 2D homogeneous coordinates, but the existence of 3D textures and cube maps precludes that. u,v,w,<anything> is unacceptable because w is too firmly established as the projective divisor.

    Mathematical texts discussing surfaces don't have this problem, but OpenGL has to address it.

  6. #6
    Senior Member Regular Contributor
    Join Date
    Mar 2015
    Posts
    296
    So that is how it is. Then, how about letter 'h' which is also often used in homogenous coordinate?
    We get use to u,v in the complex variable, u=f(x,y), v=g(x,y), or x(u,v),y()...

    of cuase we don't mind which are used, no matter they are elephant or tiger...

Similar Threads

  1. about texture coordinate
    By freesui1984 in forum OpenGL ES
    Replies: 0
    Last Post: 09-18-2008, 07:21 PM
  2. 3d texture r coordinate
    By hwj_just in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 06-15-2005, 12:30 AM
  3. coordinate of 3d texture
    By hwj_just in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-13-2005, 04:49 PM
  4. texture coordinate?
    By hwj_just in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-30-2005, 12:39 AM
  5. texture coordinate array enabled but texture mapping not?
    By drumminj in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 01-18-2001, 11:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean