Author Topic: Particle System as part of NGUI  (Read 2673 times)

schwarzenego

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Particle System as part of NGUI
« on: March 09, 2015, 01:15:59 PM »
Hey,

I'm trying to place a few particle systems inside my HUD, as feedback from clicks, selected items, etc, however as you can imagine, it is not as easy as it sounds. By toying with queue order of the particle additive/alpha blended shaders, I managed to get the particles into the correct render order in relation to NGUI... that is, in from of some stuff, behind other stuff. However, the problem is that sometimes I have particle systems inside Scrollable content, inside a clipped panel. As you can also imagine, the particles show up even if they are outside of the visible area in the panel, because they are not clipped by it.

Is there a way to make particles be affected by the panel clipping of NGUI? Maybe something with the shader...?

Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Particle System as part of NGUI
« Reply #1 on: March 10, 2015, 08:17:18 PM »
You would need to create a custom shader, but it wouldn't be that simple... You'd have to examine the clipped version of shaders that come with NGUI (such as Unlit - Transparent Colored 1) and create your own version. You will also need to set the expected shader values (_ClipRange0 and _ClipArgs0) the same way NGUI does.