Author Topic: Change pixel color of UISprite  (Read 4201 times)

Magic Frame

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Change pixel color of UISprite
« on: December 02, 2014, 05:49:56 AM »
Hi all,

I have a Sprite, this Sprite is white and black, is possible access to color pixel? and change black color to green color for example?

best regards

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Change pixel color of UISprite
« Reply #1 on: December 02, 2014, 12:26:56 PM »
Only if you write some custom shader for that. NGUI lets you tint the whole sprite, not select pixels. In general it's much easier to create a custom sprite made up of different sprites. For example if you have a sprite of a human with pants and shirt, you can instead split it up into several ones -- a sprite for human's skin, another sprite for human's shirt, and one more for human's pants. You can then tint them individually.