[Unity3D] [NGUI] how to add shader and unity3dngui to UITexture In the Clipping Panel

Source: Internet
Author: User

[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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.