0
我写了多个fixed function Shaders
。我注意到,只要着色器包含超过3个2D纹理,着色器就会中断并统一报告Material doesn't have a ... property
对于每个属性...材质。例如:使用超过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
报告此错误。这似乎是一个错误。如何解决这个问题呢?