I am trying to apply wrapping modes to cube map texture. Here are my tex-coordinates
#define eps1 1.0
GLfloat tex_coords[] = {
/* +X side */
1.0, -eps1, -eps1,
1.0, -eps1, eps1,
1.0, eps1, eps1,
1.0, eps1, -eps1,
/* -X side */
-1.0, eps1, -eps1,
-1.0, eps1, eps1,
-1.0, -eps1, eps1,
-1.0, -eps1, -eps1,
/* +Y side */
-eps1, 1.0, -eps1,
-eps1, 1.0, eps1,
eps1, 1.0, eps1,
eps1, 1.0, -eps1,
/* -Y side */
-eps1, -1.0, -eps1,
-eps1, -1.0, eps1,
eps1, -1.0, eps1,
eps1, -1.0, -eps1,
/* +Z side */
eps1, -eps1, 1.0,
-eps1, -eps1, 1.0,
-eps1, eps1, 1.0,
eps1, eps1, 1.0,
/* -Z side */
eps1, eps1, -1.0,
-eps1, eps1, -1.0,
-eps1, -eps1, -1.0,
eps1, -eps1, -1.0,
};
How to modify my tex-cords so that I can see the repeated or clamped-to-edge texture?
I tried changing eps1 but no use. I have 3*3 texture.
as per specs
“When sampling from cube map textures, a three-dimensional texture coordinate is used to select one of the cube map faces and generate a two dimensional texture coordinate ( s t ), at which a texel is sampled from the determined face of the cube map texture. Each face of the texture is treated as an independent two-dimensional texture, and the generated ( s t ) coordinate is subjected to the same clamping and wrapping rules as for any other two dimensional texture fetch.”