Author Topic: NGUI object geometry  (Read 11131 times)

Argiris

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 6
    • View Profile
NGUI object geometry
« on: April 21, 2017, 09:58:25 AM »
Hello.

We'd like to use the Gradient Shader Pack plugin, but the author doesn't know if it will be compatible with NGUI.

He said the following.

Any help would be appreciated.

Thanks!
Argiris

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI object geometry
« Reply #1 on: April 22, 2017, 11:32:15 AM »
NGUI creates quads and you can use any shader with them. For example if you create a UITexture, then give it a material, it will display that material as-is. You can use any unlit shader (and even lit ones if you enable normals on the panel responsible for the widget). Furthermore, you can use UV2 to feed extra data to your shader, which is useful if you are using a sprite that draws a part of an atlas but still want 0-1 range coordinates for the left/right and bottom/top of your widget's bounds to sample a secondary texture.

So in short -- I see no reason why it won't work.

Argiris

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: NGUI object geometry
« Reply #2 on: April 23, 2017, 06:38:12 AM »
Thank you, Michael! :)