|
|
|
|
|
|
#error SHADERPASS_is_not_correctly_define |
|
|
|
#endif |
|
|
|
|
|
|
|
float4 Frag(PackedVaryings packedInput) : SV_Target |
|
|
|
void Frag( PackedVaryings packedInput, |
|
|
|
outColor SV_Target |
|
|
|
#ifdef _DEPTHOFFSET_ON |
|
|
|
float outputDepth : SV_Depth |
|
|
|
#endif |
|
|
|
) |
|
|
|
{ |
|
|
|
FragInputs input = UnpackVaryings(packedInput); |
|
|
|
|
|
|
|
|
|
|
float3 bakeDiffuseLighting = GetBakedDiffuseLigthing(surfaceData, builtinData, bsdfData, preLightData); |
|
|
|
LightLoop(V, posInput, preLightData, bsdfData, bakeDiffuseLighting, diffuseLighting, specularLighting); |
|
|
|
|
|
|
|
return float4(diffuseLighting + specularLighting, builtinData.opacity); |
|
|
|
outColor = float4(diffuseLighting + specularLighting, builtinData.opacity); |
|
|
|
|
|
|
|
#ifdef _DEPTHOFFSET_ON |
|
|
|
outputDepth = posInput.rawDepth; |
|
|
|
#endif |
|
|
|
} |
|
|
|
|