# Texture being stretched when using D3DTADDRESS_CLAMP

I'm trying to create a skybox using a cube and using one of this textures: http://forum.unity3d.com/threads/mundus-skybox-pack-01-released.202748/

I've got it working well, but I noticed there are some bugs on the edges of the cube, as it can be seen here:

I found that this could be fixed using clamping, so I set D3DSAMP_ADDRESSU and D3DSAMP_ADDRESSV to D3DTADDRESS_CLAMP. This, however, produced the following result:

Half of the cube wasn't being shown and the other half was only showing a one-pixel wide texture region. I saw this similar question (which uses wrapping though), but I'm already using 4 vertices per face. So, what could be causing this?

What are the texture coordinates that you're using for those vertices? With D3DTADDRESS_CLAMP, they must be in the [0;1] range, anything else will be clamped to [0;1]. So, for example, using the [-1;0] coordinate range could cause this as it would make all of them effectively 0.