Results 1 to 4 of 4

Thread: Tiling textures with integer UV's.

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Location
    UK
    Posts
    5

    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 )

    Thanks,

    Steve.

  2. #2
    Senior Member
    Join Date
    Sep 2003
    Location
    Seattle, WA
    Posts
    246

    Re: Tiling textures with integer UV's.

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

    - HM

  3. #3
    Junior Member
    Join Date
    Jun 2004
    Location
    UK
    Posts
    5

    Re: Tiling textures with integer UV's.

    Using the TextureMatrix right?

    Thanks,

    Steve.

  4. #4
    Senior Member
    Join Date
    Sep 2003
    Location
    Seattle, WA
    Posts
    246

    Re: Tiling textures with integer UV's.

    Yep.

Similar Threads

  1. WebGL Tiling and Mipmapping issues
    By SarkyKeshy in forum WebGL - General
    Replies: 1
    Last Post: 02-11-2012, 04:08 AM
  2. Texture Tiling Problem
    By GreenToad in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 02-07-2005, 06:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •