Author Topic: UITexture and WWW == Border Artifact  (Read 4126 times)

NaxIonz

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 70
    • View Profile
UITexture and WWW == Border Artifact
« on: August 06, 2015, 01:56:25 PM »
We are getting and using a texture at runtime from a WWW object, however, on some devices there is a very subtle border-artifact on the texture.

We've checked the PNG several times in Photoshop, and there doesn't seem to be any issue with the alpha around the perimiter, and as I mention before, not every device shows the artifact.

Any thoughts as to why this would be occurring?


  1. private static IEnumerator button_texture_coroutine ()
  2. {
  3.     WWW www = new WWW(ButtonURL);
  4.     yield return www;
  5.  
  6.     ButtonTexture = www.texture;
  7. }
  8.  
  9. private void refresh_buttons ()
  10. {
  11.   ...
  12.  
  13.     m_button_texture.mainTexture = ButtonTexture;
  14.     m_button_texture.MakePixelPerfect();
  15.  
  16.   ...
  17. }
  18.  

For reference:
I've attached a cropped screenshot where you can see the artifact down the center. Basically a single pixel slight-alpha line

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITexture and WWW == Border Artifact
« Reply #1 on: August 08, 2015, 11:34:43 PM »
This isn't an NGUI question. You need to set your texture's Wrap Mode to "Clamp".