
Shader中使用”UsePass”引用同一个Shader的另外一个SubShader的Pass会导致崩溃,这个是Bug还是就是不能这么写?我使用的版本是2017.4.6f1。例如这样:
1 |
Shader "Unlit/NewUnlitShader 1" |
UsePass主要是用来实现不同的Shader中的代码复用的,查看文档的话也可以看到相关描述:
Some of the shaders conld reuse existing passes from other shaders, reducing code duplication
所以不要用UsePass引用同一个Shader中的Pass




近期评论