• Advertisement
Sign in to follow this  

Texture Coordinate Direction

This topic is 4847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey All, I'm currently working on my own implementation of bump mapping and I was using Nehe's lesson 22 as a guide. However I am looking in the function: bool doMesh2TexelUnits(void) and in this function he makes use of: // s-Texture Coordinate Direction, Normalized GLfloat s[4]={0.0f,0.0f,0.0f,1.0f}; // t-Texture Coordinate Direction, Normalized GLfloat t[4]={0.0f,0.0f,0.0f,1.0f}; but I'm not exactly sure what these are. I'm used to specifing texture coordinates using glTexCoord2f where I think of a texture as a flat surface, that has 2 dimensional coordinates. I'm not sure of how to think of these "texture coordinate directions" or even where to begin looking for some more information on them. I'm also not using a square box in my image, so I'm not sure how to set them up. If anyone has any ideas, please let me know! Thanks Danielle

Share this post


Link to post
Share on other sites
Advertisement
As i said in the other thread. s and y are just like x and y. its just that they are for textures. I hope this helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement