Change Queue Not Work In Unity Shader

来源:互联网 发布:使用c语言完成http请求 编辑:程序博客网 时间:2024/04/28 10:55

Problem:

It seems like there is some sort of bug with shaders / materials regarding render queues.
I have shader that is set to be in Geometry+10, and another shader that is set to be in the Geometry queue. It the frame debugger the shader that is supposed to be in the Geometry+10 queue is drawn first! And the shader that is supposed to be in the Geometry queue is drawn in the alpha pass!


Solution:

It's been reported for a while by several of us since 5.0. When you change the shader a material uses it sets the material'squeue to that of the shader at the moment you change it. This is very frustrating for shader development. The easiest fix is, as you said, to change to another shader and back, but another way is to right click on the inspector and select debug and then change the custom queue to -1. This is a special setting that means "use the shader's queue" and is what it was set to prior to 5.0.


url:http://forum.unity3d.com/threads/5-3p1-queue-tag-buggy.379544/

0 0
原创粉丝点击