We are about to switch to a new forum software. Until then we have removed the registration on this forum.
varying vec4 vertTexCoord;
vertTexCoord is of type vec4. I have seen access to it with .s, .t, .st, .r, .g, .b, .a.
Where does s and t and st stand for? And when does it have what?
Answers
It's a single vector with four numbers in it. It's usually used for position, .x, .y, .z, .w, or for color, .r, .g, .b, .a, or for texture coordinates, .s, .t, .p, .q. There's no difference between .x, .r, and .s - they're all fancy ways of refering to the "first" number in this vector.
.st is itself a vector, containing the .s and .t parts. This is a fancy way of accessing values in it, which is apparently called Swizzling.
https://www.opengl.org/wiki/Data_Type_(GLSL)
Check section 1.2.1.
thanks!