Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Texture Atlas Problem

  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2005
    Location
    CA
    Posts
    113

    Texture Atlas Problem

    Is there any way that I can achieve tiles using a texture atlas? I can't figure out how to (ie) be capable to tile a texture that is in the middle of the atlas...

    Tks in advance for the tip!

    Cheers!

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2004
    Posts
    999

    Re: Texture Atlas Problem

    If you're using shaders you could first apply a linear transformation that maps the rectangle in your texture atlas to the [0,1]x[0,1] range and take the fractional value of the result. After that, apply the inverse transformation to the result. Finally, use the resulting value for your texture lookups.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Dec 2005
    Location
    CA
    Posts
    113

    Re: Texture Atlas Problem

    Hummm, I see, but without shaders is there a way?

    Im exploring this technique in order to apply it on a mobile device app, no shaders are available and well on 2 texture channel can be used... any suggestions?

    Cheers!

  4. #4
    Advanced Member Frequent Contributor arekkusu's Avatar
    Join Date
    Nov 2003
    Posts
    676

    Re: Texture Atlas Problem

    No. You can't wrap texture coordinates to arbitrary subrectangles.

Posting Permissions

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