Change Queue Not Work In Unity Shader

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/cubesky/article/details/50929743

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/

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页