Author Topic: Tiled sprites not tiling properly?  (Read 2634 times)

patrickkidd

  • Guest
Tiled sprites not tiling properly?
« on: August 31, 2013, 03:34:18 PM »
Tiled sprites don't seem to always repeat properly. Am I doing something wrong? I'm using the latest NGUI version.

http://www.screencast.com/t/GH6yNLOMj4y

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Tiled sprites not tiling properly?
« Reply #1 on: August 31, 2013, 08:18:27 PM »
Wow those stripes messed with my eyes.

So, what you're seeing is filtering artifacts. For Tiled sprites, you can get around them by making a 1 px border around the whole thing in PS and add that border to the sprite in the atlas, that way the mesh that gets created cuts away that 1 px border.

I believe that if it's pixel perfect you shouldn't see those artifacts in any case, but I'm not 100 %.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tiled sprites not tiling properly?
« Reply #2 on: September 02, 2013, 06:28:27 PM »
This is due to how texture filtering works. You need to have a 1 pixel border. That is, extend your tiled image by 1 pixel on each side and give it a 1 pixel border within the atlas. Then it will tile correctly without any seams.