Author Topic: color gradient sprites  (Read 3060 times)

beermoney

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 80
    • View Profile
color gradient sprites
« on: October 28, 2014, 06:47:09 AM »
didn't want to bring this thread back to life...
http://www.tasharen.com/forum/index.php?topic=8918.0
but...
I think gradient sprites would be very useful! I disagree that adding it to uisprite would clutter the inspector, I'd imagine a simple check box to disable/hide the gradient if it's not used.  It would be immensely useful in allowing variation to UIs while keep the atlas size to a minimum.

yuewah

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 180
    • View Profile
Re: color gradient sprites
« Reply #1 on: October 28, 2014, 10:41:26 AM »
+1

bac9

  • Full Member
  • ***
  • Thank You
  • -Given: 2
  • -Receive: 4
  • Posts: 113
    • View Profile
Re: color gradient sprites
« Reply #2 on: October 28, 2014, 11:05:44 AM »
You can simply add a semi-transparent overlay sprite to create a gradient of any shape over your widget. Far more flexible than attempting to influence vertex colors directly (which won't even work properly with a sliced sprite without end-to-end edges).

beermoney

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 80
    • View Profile
Re: color gradient sprites
« Reply #3 on: October 28, 2014, 03:22:29 PM »
I don't think an overlayed component is going to do any favours to fill rate, also what if the thing I want to gradient has alpha in it?, the gradient would be applied to anything behind it, thanks for the suggestion tho

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: color gradient sprites
« Reply #4 on: October 29, 2014, 05:17:46 AM »
Just create a custom widget that does this in the OnFill function.