很简单 其实就是下面的一个pass:
Pass { Tags { "LightMode" = "VertexLMRGBM" } Lighting Off BindChannels { Bind "Vertex", vertex Bind "texcoord1", texcoord0 // lightmap uses 2nd uv Bind "texcoord", texcoord1 // main uses 1st uv } SetTexture [unity_Lightmap] { matrix [unity_LightmapMatrix] combine texture * texture alpha DOUBLE } SetTexture [_MainTex] { combine texture * previous QUAD, texture * primary } }
------5.0--------------------------------------------------------------------------------------------------------我就是懒你怎么着------------------------------------------------------------------------------------------------
Pass {
Tags { "LightMode" = "VertexLM" }
Lighting Off
BindChannels {
Bind "Vertex", vertex
Bind "texcoord1", texcoord0 // lightmap uses 2nd uv
Bind "texcoord", texcoord1 // main uses 1st uv
}
SetTexture [unity_Lightmap] {
matrix [unity_LightmapMatrix]
combine texture
}
SetTexture [_MainTex] {
constantColor (1,1,1,1)
combine texture * previous DOUBLE, constant // UNITY_OPAQUE_ALPHA_FFP
}
}