顶点着色器:
1,计算顶点颜色
2,定点变换
3,灯光作用
Shader "Custom/one"
{
Properties
{
_TextColor ("TextColor", Color) = (1,0,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
}
SubShader
{
Pass
{
// Color[_TextColor]//调节顶点颜色//Color(1,1,1,1)
Material
{
Diffuse[_TextColor]
//Ambient 环境光
//Diffuse 漫反射
//Specular 镜面反射(需另外开关)
//Emission 自发光
//光照公式*Unity自带光+(漫反射*Light Color+镜面反射*Light Color)+Emission
}
Lighting On//(灯光总开关)
}
}
}