3. Shader depth test (cull, zwrite, ZTest)

Source: Internet
Author: User

Culling and depth testing are a process in rendering normals

Cull: By default, all the shader in unity are single-sided, and it turns off the rendering of the opposite side, if you need to use the double-sided in the development process, just turn off the cull (off)!

Zwrite: Deep Cache Zwrite is on by default, because we have a lot of models in the scene, then the relationship between the model and the model is controlled by the zwrite, so it is turned on by default, it has been introduced before.

Look directly at the effect to introduce

Cull:unity all the shader are single-sided, it is the opposite of the rendering to close off, we see what is going on, we have to create a new plane, look at it will know,

This is the effect of cull back, which is the default in unity.

When cull is fornt, the effect is:

When cull is off, the effect is:

3. Shader depth test (cull, zwrite, ZTest)

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.