Clamp UV of a texture unit

Is it possible to clamp UV coords of a texture unit inside a quad command?
I am trying to offset the uvs in the shader but I am getting repeat by default.

For example if I have texture unit in the diffuse slot inside a quad command.

And I want to clamp the UV coords.



Would this work or it is not supported?

The UV addressing mode of the texture must have been set beforehand to what you want, the renderpath commands are not going to change it.

Thanks cadaver.
Do you mean something like this? And then passing this to the texture unit.

Texture2D* texture = cache->GetResource<Texture2D>(filepath); texture->SetAddressMode(COORD_U, ADDRESS_CLAMP); texture->SetAddressMode(COORD_V, ADDRESS_CLAMP);

Yes, or using the xml definition file alongside the texture.