|
|
|
|
|
|
|
|
|
|
half3 viewDir : TEXCOORD6; |
|
|
|
half4 fogFactorAndVertexLight : TEXCOORD7; // x: fogFactor, yzw: vertex light |
|
|
|
|
|
|
|
#ifdef _SHADOWS_ENABLED |
|
|
|
#endif |
|
|
|
|
|
|
|
float4 clipPos : SV_POSITION; |
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID |
|
|
|
|
|
|
inputData.viewDirectionWS = normalize(IN.viewDir); |
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef _SHADOWS_ENABLED |
|
|
|
#else |
|
|
|
inputData.shadowCoord = float4(0, 0, 0, 0); |
|
|
|
#endif |
|
|
|
|
|
|
|
inputData.fogCoord = IN.fogFactorAndVertexLight.x; |
|
|
|
inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw; |
|
|
|
inputData.bakedGI = SampleGI(IN.lightmapUVOrVertexSH, inputData.normalWS); |
|
|
|
|
|
|
half3 vertexLight = VertexLighting(o.posWS, o.normal); |
|
|
|
half fogFactor = ComputeFogFactor(o.clipPos.z); |
|
|
|
o.fogFactorAndVertexLight = half4(fogFactor, vertexLight); |
|
|
|
|
|
|
|
#ifdef _SHADOWS_ENABLED |
|
|
|
#endif |
|
|
|
|
|
|
|
return o; |
|
|
|
} |
|
|
|