1 模型空间转裁剪空间 UnityObjectToClipPos(v.vertex)git
2 模型空间转世界空间 mul( unity_ObjectToWorld, v.vertex )orm
3 雾三件套blog
UNITY_FOG_COORDS(3) UNITY_TRANSFER_FOG(o,o.pos); UNITY_APPLY_FOG(i.fogCoord, c);
4 环境光 UNITY_LIGHTMODE_AMBIENT
光照模型:ip
blinnphone:it
c = ambient * diffuse + diffuse * saturate( dot( worldnormal , lgithdir ) ) + specular * pow( max( 0, dot( h, worldnormal ) , _Gloss )class