Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unity3d 使用3个以上2D纹理时,“材质没有…属性”_Unity3d_Shader - Fatal编程技术网

Unity3d 使用3个以上2D纹理时,“材质没有…属性”

Unity3d 使用3个以上2D纹理时,“材质没有…属性”,unity3d,shader,Unity3d,Shader,我编写了多个固定函数着色器。我注意到,只要着色器包含3个以上的2D纹理,着色器就会中断,并且材质没有。。。每个属性的属性。。。这种材料已经过时了。例如: Shader "Custom/JustAnotherShader" { Properties{ _MainTex("Base (RGB)", 2D) = "white" { } _TexA("Another Texture", 2D) = "black" { } _TexB("Yet An

我编写了多个固定函数着色器。我注意到,只要着色器包含3个以上的2D纹理,着色器就会中断,并且材质没有。。。每个属性的属性。。。这种材料已经过时了。例如:

Shader "Custom/JustAnotherShader" {
    Properties{
        _MainTex("Base (RGB)", 2D) = "white" { }
        _TexA("Another Texture", 2D) = "black" { }
        _TexB("Yet Another Texture", 2D) = "" { }
        _TexC("One More Another Texture", 2D) = "" { }
    }

    SubShader {
        Pass {
            SetTexture[_MainTex] { combine texture }
            SetTexture[_TexA] { combine texture * previous }
            SetTexture[_TexB] { combine texture + previous }
            SetTexture[_TexC] { combine texture - previous }
        }
    }

    Fallback Off
}

此代码将为_MainTex、_TexA、_TexB和_TexC报告此错误。这似乎是一个错误。如何解决这个问题?

经过一些研究,我现在可以得出结论,我使用的着色器编译目标不支持三种以上的纹理。不幸的是,我丢失了描述此限制的文档链接