|
|
|
|
|
|
|
|
|
|
SurfaceData surfaceData; |
|
|
|
InitializeStandardLitSurfaceData(IN.uv, surfaceData); |
|
|
|
ApplySSAO(surfaceData.occlusion, IN.shadowCoord); //The shadowcoord is the screen space position. |
|
|
|
|
|
|
|
InputData inputData; |
|
|
|
InitializeInputData(IN, surfaceData.normalTS, inputData); |
|
|
|
|
|
|
ApplyFog(color.rgb, inputData.fogCoord); |
|
|
|
return color; |
|
|
|
return half4(color.rgb * SSAO(IN.shadowCoord), color.a); |
|
|
|
} |
|
|
|
|
|
|
|
// Used for Standard shader |
|
|
|
|
|
|
#elif defined(_DEBUG_SMOOTHNESS) |
|
|
|
debug = surfaceData.smoothness; |
|
|
|
#elif defined(_DEBUG_OCCLUSION) |
|
|
|
ApplySSAO(surfaceData.occlusion, IN.shadowCoord); |
|
|
|
debug = surfaceData.occlusion; |
|
|
|
debug = surfaceData.occlusion * SSAO(IN.shadowCoord); |
|
|
|
#elif defined(_DEBUG_SHADOWS) |
|
|
|
debug = RealtimeShadowAttenuation(IN.shadowCoord); |
|
|
|
#endif |
|
|
|