Синтаксис:
Используется csharp
Shader "Custom/Px1" {
Properties {
_Col ("_ColorAmb", Color) = (1,1,1,1)
}
SubShader {
Tags { "RenderType"="Opaque" }
Pass {
#pragma surface surf BlinnPhong alpha
CGPROGRAM
struct Input
{
float4 color : COLOR;
};
fixed4 _Col;
void surf (Input IN, inout SurfaceOutput o)
{
o.Albedo = _Col.rgb;
o.Alpha = _Col.a;
}
ENDCG
}
}
}
Properties {
_Col ("_ColorAmb", Color) = (1,1,1,1)
}
SubShader {
Tags { "RenderType"="Opaque" }
Pass {
#pragma surface surf BlinnPhong alpha
CGPROGRAM
struct Input
{
float4 color : COLOR;
};
fixed4 _Col;
void surf (Input IN, inout SurfaceOutput o)
{
o.Albedo = _Col.rgb;
o.Alpha = _Col.a;
}
ENDCG
}
}
}