Change Queue Not Work In Unity Shader


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!


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.


文章标签: Unity Shader Queue Tags
个人分类: Unity开发
想对作者说点什么? 我来说一句