Sign in to follow this  

clamp UV

This topic is 4695 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It clamps texture coordinats (sometimes called u and v) to [0,1] range.
A few examples for 2D coordinats:

(1.0,4.1) => (1.0,1.0)
(-0.2,0.4) => (0.0,0.4)
(-0.2,2.3) => (0.0,0.0)

Share this post


Link to post
Share on other sites
If you're thinking of Clamp UV as in a rendering state setting, it might be better to think of clamping as controlling how the texture color (texel) is looked up, rather than modifying the coordinates.

Clamping texture modes cause the pixels at the edge of the texture to be used when the texture coordinates "run off the edge". So if you are drawing something with a texture that has green at the right edge, and you use texture coordinates with U > 1, the color that will be used will be green no matter what U or V is (as long as U > 1).

There are other modes like tile, reflect, and border color, but clamp and tile (which wraps around to the other edge of the texture) are most common.

Of course you could be talking about a 3d program which actually modifies the UV coordinates also; what I said above just applies to 3d APIs like GL and D3D.

Share this post


Link to post
Share on other sites

This topic is 4695 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this