|
|
|
|
|
|
float3 lwWorldPos = TransformObjectToWorld(v.vertex.xyz); |
|
|
|
float4 clipPos = TransformWorldToHClip(lwWorldPos); |
|
|
|
|
|
|
|
// We either sample GI from lightmap or SH. lightmap UV and vertex SH coefficients |
|
|
|
// are packed in lightmapUVOrVertexSH to save interpolator. |
|
|
|
// The following funcions initialize |
|
|
|
// We either sample GI from lightmap or SH. |
|
|
|
// Lightmap UV and vertex SH coefficients use the same interpolator ("float2 lightmapUV" for lightmap or "half3 vertexSH" for SH) |
|
|
|
// see DECLARE_LIGHTMAP_OR_SH macro. |
|
|
|
// The following funcions initialize the correct variable with correct data |
|
|
|
OUTPUT_LIGHTMAP_UV(v.texcoord1, unity_LightmapST, o.lightmapUV); |
|
|
|
OUTPUT_SH(lwWNormal, o.vertexSH); |
|
|
|
|
|
|
|