Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: schwarzenego on March 09, 2015, 01:15:59 PM

Title: Particle System as part of NGUI
Post by: schwarzenego 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!
Title: Re: Particle System as part of NGUI
Post by: ArenMook 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.