|
|
|
|
|
|
half3 viewDir : TEXCOORD6; |
|
|
|
half4 fogFactorAndVertexLight : TEXCOORD7; // x: fogFactor, yzw: vertex light |
|
|
|
|
|
|
|
//<<< MSVO BEGIN |
|
|
|
//>>> MSVO END |
|
|
|
|
|
|
|
float4 clipPos : SV_POSITION; |
|
|
|
}; |
|
|
|
|
|
|
half fogFactor = ComputeFogFactor(o.clipPos.z); |
|
|
|
o.fogFactorAndVertexLight = half4(fogFactor, vertexLight); |
|
|
|
|
|
|
|
//<<< MSVO BEGIN |
|
|
|
//TODO: flip Y based on screen params. |
|
|
|
//Is there a function in the library to already do this? |
|
|
|
//>>> MSVO END |
|
|
|
|
|
|
|
return o; |
|
|
|
} |
|
|
|
|
|
|
half3 indirectDiffuse = SampleGI(IN.lightmapUVOrVertexSH, normalWS); |
|
|
|
float fogFactor = IN.fogFactorAndVertexLight.x; |
|
|
|
|
|
|
|
//<<< MSVO BEGIN |
|
|
|
//>>> MSVO END |
|
|
|
|
|
|
|
half4 color = LightweightFragmentPBR(IN.posWS.xyz, normalWS, IN.viewDir, indirectDiffuse, IN.fogFactorAndVertexLight.yzw, surfaceData.albedo, surfaceData.metallic, surfaceData.specular, surfaceData.smoothness, surfaceData.occlusion, surfaceData.emission, surfaceData.alpha); |
|
|
|
|
|
|
|