Properties 的变量怎么传到SubShader中

Posted 露夕逝

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Properties 的变量怎么传到SubShader中相关的知识,希望对你有一定的参考价值。

如下代码:

Properties 
{
    Tex ("Texture", 2D) = "white" {}
    num("num",int)=0
}

想在SubShader中获取这两个啊,只需要在CGPROGRAM中

以上是关于Properties 的变量怎么传到SubShader中的主要内容,如果未能解决你的问题,请参考以下文章