Texture Coordinate Direction
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
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement