Author Topic: Is there anyway to brighten a UISprite  (Read 2546 times)

chrisgdaniel

  • Guest
Is there anyway to brighten a UISprite
« on: January 17, 2013, 04:03:34 PM »
I was wondering if there is any way to brighten a UISprite in NGUI?

I am trying to color cycle a UISprite using its mColor property. This works fine for tinting the sprite darker, but it does not allow me to brighten the sprite at all, not even when I override the mColor to use out of bounds numbers (like mColor.r=3.0f;).

Does NGUI support brightening sprites? If not, is there a suggested workaround (maybe a shader that works nicely with NGUI and allows me to brighten)? Or is there anyway to modify how UISprite uses mColor when it draws so that I could get it to work in reverse for a couple sprites?

If anyone has any advice I would love to hear it. Thank you.

~chris

Ferazel

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 150
    • View Profile
Re: Is there anyway to brighten a UISprite
« Reply #1 on: January 17, 2013, 05:06:54 PM »
The easiest thing to do would be to brighten the source image of the sprite. Coloring is using a multiplication of color which does not increase the brightness of the source image as you noticed.

chrisgdaniel

  • Guest
Re: Is there anyway to brighten a UISprite
« Reply #2 on: January 17, 2013, 05:13:40 PM »
I completely agree.

Unfortunately the image is rather colorful and I only want to tint it 5% of the time, so brightening the image would fix my problem, but at a cost of lowering the contrast of my image the 95% of the time it is untinted.