How exactly are textures drawn on faces of cubes?
- by Christian Frantz
Are they drawn from the lower left corner clockwise? I know how triangles are created, I'm not just sure if textures are the same way. The texture on my cube is skewed way off and after playing around with the U,V coordinates, I still can't get it right.
//front left bottom corner ok
vertices[0] = (new VertexPositionTexture(new Vector3(0, 0, 0), new Vector2(1, 0)));
//front left upper corner
vertices[1] = (new VertexPositionTexture(new Vector3(0, 1, 0), new Vector2(1, 1)));
//front right upper corner ok
vertices[2] = (new VertexPositionTexture(new Vector3(1, 1, 0), new Vector2(0, 1)));
//front lower right corner
vertices[3] = (new VertexPositionTexture(new Vector3(1, 0, 0), new Vector2(0, 0)));
//back left lower corner ok
vertices[4] = (new VertexPositionTexture(new Vector3(0, 0, -1), new Vector2(0, 1)));
//back left upper corner
vertices[5] = (new VertexPositionTexture(new Vector3(0, 1, -1), new Vector2(1, 1)));
//back right upper corner ok
vertices[6] = (new VertexPositionTexture(new Vector3(1, 1, -1), new Vector2(1, 0)));
//back right lower corner
vertices[7] = (new VertexPositionTexture(new Vector3(1, 0, -1), new Vector2(0, 0)));