[Unity3D] [NGUI] how to add shader and unity3dngui to UITexture In the Clipping Panel
NGUIForum: 333417608
NGUI version: 3.6.5
In a newer version, NGUI writes several versions for some of its own shader to implement Clipping nesting.
Unencrypted-Transparent Colored. shader No Clipping
Unencrypted-Transparent Colored 1. Layer 1 Clipping of shader
Unencrypted-Transparent Colored 2. shader Layer 2 Clipping
Unencrypted-Transparent Colored 3. shader Layer 3 Clipping
Replace the shader code in the CreateMaterial section of UIDrawCall.
Therefore, if you have added your own shader and want to support Clipping, You need to implement the above four versions at the same time.
In fact, the subject content of the above four versions is the same, so for convenience, you can:
1. Copy the four shader.
2. Modify the top name of each shader
3. Replace each of your own shader Main Functions
(NGUI supports layer-3 nested Clipping by default. You can expand layer-4, layer-5, and layer-6, but it is unnecessary)