官方文档
材质属性声明
简单漫反射
Shader "ShaderCaseLearn/CustomsDiffuse"//定义路径
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)//显示在监视窗口的属性
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Standard fullforwardshadows
#pragma target 3.0
struct Input
{
float2 uv_MainTex;
};
fixed4 _Color;
UNITY_INSTANCING_BUFFER_START(Props)
UNITY_INSTANCING_BUFFER_END(Props)
void surf (Input IN, inout SurfaceOutputStandard o)
{
fixed4 c =_Color;
o.Albedo = c.rgb;
}
ENDCG
}
FallBack "Diffuse"
}