Hello Guest

Author Topic: NGUI Clipped Panel shader and tk2d  (Read 6286 times)

Majicpanda

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 62
    • View Profile
NGUI Clipped Panel shader and tk2d
« on: July 20, 2013, 05:18:50 am »
http://www.tasharen.com/forum/index.php?topic=5065.0

In the above post I asked how clipped panels worked in NGUI and it's apparently with a shader.  When I try to use this on a tk2d material it makes the sprites not show up at all.  Curious if you had any suggestions at all on your end.

I'm trying to use the same atlas to re-create a character in ngui so I can use it in the HUD and other GUI things.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: NGUI Clipped Panel shader and tk2d
« Reply #1 on: July 20, 2013, 11:08:08 am »
Use the tk2dUIMask object and place it where you'd like to mask things. Look at the tk2d UI scrollable area sample to figure out how it works. It doesn't require a shader swap, and clips everything inside the blue volume. I'm sure you could come up with a creative solution using that :)