(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