Followers 0

# Large texture coordinate range

## 1 post in this topic

So I'm working on converting files model files to my own format and I noticed that the texture coordinates range from -5 to 1.8. If I am understanding how textures are supposed to work, The coordinates are supposed to range from 0-1 and anything other than that is covered by the WRAP variable in the sampleState.

Is this correct? Do I need to do something else to handle the case of such a wide range of tex coords? because it doesnt show up right in my program, but other models do and it shows up fine in maya and blender.

Thank You

0

##### Share on other sites

If the model has been created and textured mapped correctly, then those coordinates mean that the texture repeats when mapped to the model.

In order to make it show correctly on your program, when you load the texture the model uses, you have to set the wrap mode to repeat instead of clamp.

For example, in OpenGL you'd do this:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);


You can also try GL_MIRRORED_REPEAT instead of GL_REPEAT if it doesn't appear correct.

See if it works.

1

## Create an account

Register a new account