NGUI Discussion Group:333417608
Ngui Version: 3.6.5
Ngui in the newer version, in order to implement clipping nesting, for some of his own shader wrote several versions.
Unlit-transparent Colored.shader No clipping
Unlit-transparent colored 1.shader 1 layer clipping
Unlit-transparent Colored 2.shader 2 layer clipping
Unlit-transparent Colored 3.shader 3 layer clipping
Replace the shader code in the Creatematerial section of the Uidrawcall.
So if you add your own shader, and you want to support clipping, you need to implement the above 4 versions as well.
In fact, the above 4 versions of the main content is the same, so if for convenience, you can:
1. Copy one of these 4 shader
2. Modify the top name on each shader
3. Replace each part of your shader body function
(Ngui supports 3 layers of nested clipping by default, you can expand your own 4, 5, 6, etc., but not necessary)
"Unity3d" "NGUI" how to give clipping under the panel uitexture plus shader