Author Topic: Forcing Bilinear on some textures?  (Read 3730 times)

nopecio

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 37
    • View Profile
Forcing Bilinear on some textures?
« on: October 24, 2012, 06:30:11 PM »
HI,
is there any way to force a texture to be put on the atlas using bilinear instead of point?
I want to use this only for some cases where i can benefit from it (rescaling from big to small)

Regards!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Forcing Bilinear on some textures?
« Reply #1 on: October 24, 2012, 07:26:21 PM »
Texture filtering only works when displaying textures. Reading one texture and writing it into another has nothing to do with filtering. If you want your atlas to use a different filter, just set it by selecting the texture.

nopecio

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 37
    • View Profile
Re: Forcing Bilinear on some textures?
« Reply #2 on: October 24, 2012, 07:29:26 PM »
I was thinking something like:
-Scale the texture using bilinear filter
-put that filtered texture in the new atlas

Right now the scaling process seems to be using point always, but for some cases it could be beneficial to rescale it using a different filter

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Forcing Bilinear on some textures?
« Reply #3 on: October 24, 2012, 11:20:36 PM »
NGUI doesn't scale textures for you before placing them in the atlas. If they get scaled, then it's done by Unity, and that means that the entire atlas was scaled, not just the source texture. This is bad -- very bad -- as it breaks the existing sprites.

Texture filtering is specified on the texture. As I said, specify the final atlas texture and change it to be something other than point.