Author Topic: Ngui Texture can't use material when it store in the ngui Panel  (Read 3956 times)

chiphuc113

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Hi everyone,

Like my title, i'm using a material to show a texture in my game everything is okay until i want to scroll my view so i put my UITexture into a panel and my material isn't work.

Have anyone can help with this problem pls.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Ngui Texture can't use material when it store in the ngui Panel
« Reply #1 on: March 16, 2015, 09:24:44 PM »
Clipping is done by replacing a shader. NGUI comes with an assortment of shaders, such as the default one Unlit - Transparent Colored. Note how it has several versions, such as Unlit - Transparent Colored 1, 2, etc? Each one represents how many times it gets clipped. Assuming you wrote a custom shader, you also need to write a custom clipped shader for it in order for clipping to work. Use NGUI's shaders as an example.