"Unity3d" "NGUI" how to give clipping under the panel uitexture plus shader

Source: Internet
Author: User

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

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.