Original Post
I'm having a strange problem with texture wrapping of the D3DTADDRESS_WRAP type.
I am procedurally generating a cloud texture, then mapping it to a sky dome. I then animate the texture by incrementing the texture coordinates to make them move across the sky dome.
Using the procedural texture, the texture smears across the sky after the texture coordinate excede [0.0, 1.0] (like D3DTADDRESS_CLAMP mode is set, which it isn't).
If I replace the proceduaral texture with one loaded from file, the wrapping works without a hitch.
I create the textures like this:
// The procedural texture
D3DXCreateTexture( gDevice, _textureSize, _textureSize, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &_finalTexture );
// The loaded texture
D3DXCreateTextureFromFile( gDevice, "data//txtr//cloud.tga", &_texture );
I'm incremeting the texture coordinates like this:
for (int index = 0; index < _numVertices; ++index)
{
_verts[index].tu += inc;
}
Anyone have any idea what's wrong here? I'm more than a little confused.
[edited by - Thek on November 19, 2003 9:33:44 PM]