Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Nseries on August 07, 2013, 08:52:30 AM

Title: Problem with clipping
Post by: Nseries on August 07, 2013, 08:52:30 AM
Hi all, I have a problem with panels clipping. I need to clip panel, inside which have clipped panel.
-Panel - Clipping
--Table
---GameObject
----Panel - Clipping
-----Grid (Horizontal)
---GameObject
----Panel - Clipping
-----Grid (Horizontal)
Icons did not clipped. Why? ;(
Title: Re: Problem with clipping
Post by: PoN on August 07, 2013, 10:01:38 AM
bcoz you should use only one panel with clipping on a root object or set manually material with clipping shader inside a second panel of UIWidgets.
Title: Re: Problem with clipping
Post by: Nseries on August 07, 2013, 10:15:23 AM
And what can I do with it? I really need to 2 clipping panels.
Title: Re: Problem with clipping
Post by: galuodo on August 07, 2013, 10:25:08 AM
Be sure that the shader of your material is not some special shades.
Title: Re: Problem with clipping
Post by: Nseries on August 07, 2013, 10:41:35 AM
I use SciFi Atlas with Transparent Colored Shader.  It is right?
Title: Re: Problem with clipping
Post by: galuodo on August 07, 2013, 11:12:01 AM
I use SciFi Atlas with Transparent Colored Shader.  It is right?

my mistake, your problems comes from the  clipping panel has a root panel with clip
I have tried change the shader as  PoN's suggestion, but it does not work :(
Title: Re: Problem with clipping
Post by: Nseries on August 07, 2013, 11:26:13 AM
Yes, my problem comes from root panel. A have a 2 clip panels in hierarchy and the first panel (root panel) is dont want clip second panel. Root panel clipped all except for inside panel. I dont know how to force root panel clip second panel.
Thank you galuodo for try help me, and sorry for my English) Maybe somebody else know how make this clip?
Title: Re: Problem with clipping
Post by: PoN on August 07, 2013, 09:57:50 PM
When clipping Enabled on UIPanel that means  , set material with "*Clip" shader. On root panel you should to enable clipping ,but on a second panel - disable clipping and set MATERIAL (not shader) with clipping shader for UIWidgets in hierarchy of a second panel.
Title: Re: Problem with clipping
Post by: broken on August 07, 2013, 11:55:31 PM
I could be wrong, but it seems to me that the functionality of nested panels in ngui not provided.
Title: Re: Problem with clipping
Post by: Nseries on August 08, 2013, 04:06:53 AM
When clipping Enabled on UIPanel that means  , set material with "*Clip" shader. On root panel you should to enable clipping ,but on a second panel - disable clipping and set MATERIAL (not shader) with clipping shader for UIWidgets in hierarchy of a second panel.
Do you tried do it? It doesn't work(
Title: Re: Problem with clipping
Post by: ArenMook on August 08, 2013, 09:17:51 AM
You can't nest clipping. Each panel is only able to clip widgets directly underneath it.
Title: Re: Problem with clipping
Post by: broken on August 09, 2013, 01:31:54 PM
You can't nest clipping. Each panel is only able to clip widgets directly underneath it.

but there is probably a way how to implement it (nested panels)?
Title: Re: Problem with clipping
Post by: broken on August 11, 2013, 11:56:04 PM
Aren, what constraint does not allow to add such functionality in NGUI?
Title: Re: Problem with clipping
Post by: ArenMook on August 12, 2013, 03:34:42 PM
Correct. As I said, each panel can only clip widgets directly underneath it. Clipping is done by passing a matrix to a shader.