1 Shader "Custom/MyShader"{ 2 3 Properties{ 4 _Int ("Int",Int)=2 5 } 6 7 SubShader{ 8 //显卡a使用的子着色器 9 Tags{"RenderType"="Opaque"} 10 CGPROGRAM 11 #pragma surface surf Lambert 12 struct Input 13 { 14 float4 color :COLOR; 15 }; 16 void surf(Input IN,inout SurfaceOutput o) 17 { 18 o.Albedo=1; 19 } 20 ENDCG 21 } 22 Fallback "Diffuse" 23 }
Shader "Custom/MyShader"{ Properties{ } SubShader { Pass { } } FallBack "Diffuse" }