About the Unity shader bug

Source: Internet
Author: User

(Shader this aspect of the textbook, especially the volume of light talk ambiguous, muddy muddy! )

Because of the work to be done in the use of volume light effects, so the knowledge of the corresponding research. Results:

1. A bug was found in unity shader:

Referring to the previous knowledge of DX, the mixed state is set so that when color is mixed, it is found that solid color blending (color values, relative to the map) is not possible, and that some of the textures cannot be mixed successfully. So along this line has been exploring, testing, found the truth of the event:

Unity's fragment shader does not operate according to the blend described above after the "Harvest" is finished, that is, it does not have a blend inside, and it cannot be said completely , when the marker Tags indicate "Rendertype "=" Transparent "or" queue "=" Transparent ", the map is blended according to the map's own alpha value , but the post-set alpha value of the mapped pixel cell does not participate in blend blending , you do not modify the late modification is not what the birds use;

Solid color, some part of the map will not (I this part of the test results are not comprehensive, can not be biased). (Tags this piece is also a bug, transparent processing flag processing, write very not rigorous, no rules can follow, insurance or two signs are written, one is a sort, one is transparent sign).

WORKAROUND: You need to manually perform a step by alpha operation:

The effect of volume light, just another one.

This is the end of this article.

About the Unity shader bug

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.