基本数据类型
| float | 32位浮点数 | float2——float2(float,float) float3——float3(float,float,float) float4——float4(float,float,float,float) |
| half | 16位浮点数 | half2——half2(half,half) half3——half3(half,half,half) half4——half4(half,half,half,half) |
| int | 32位整型 | int2——int2(int,int) int3——int3(int,int,int) int4——int4(int,int,int,int) |
| fixed | 12位定点数 | 取值范围0-1之间的小数,或整数 |
| bool | 布尔值 | |
| string | 字符串 | |
| sampler2D | 纹理对象 | |
编译指令
| CGPROGRAM(开头) | |
| #pragma surface surfaceFunction lightModel[optionalparams] || #pragma surface surf Lambert | surfaceFunction函数名称 |
| lightModel光照类型———Lambert漫反射 | |
| void surf(Input IN,inout SurfaceOutput o) | |
| ENDCG(结尾) | |










