Tiling textures with integer UV's

Hi all,
This is kind of a follow-up to a post about byte sized verts. I’d like to know if its possible to tile a texture using (for example) 8 bit texture co-ordinates. For example if I had a 256x256 texture I’d like to wrap 4x in U and 4x in V I would normally set the coordinates to 0.0f,0.0f -> 4.0f, 4.0f (in float) how would I do the same with 8 or 16 bit integer texture co-ordinates? Am I going to have to do it using the texture matrices, like I have done for 8/16 bit positional verts (using a scale matrix).

PS:Some examples utilising these kind of extensions would be useful (to go with the single triangle one :frowning: )

Thanks,

Steve.

You simply multiply the two scaling factors, e.g. you scale by 4/255.

  • HM

Using the TextureMatrix right?

Thanks,

Steve.

Yep.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.