|
|
|
|
|
|
ApplyFogColor(color, unity_FogColor.rgb, fogFactor); |
|
|
|
} |
|
|
|
|
|
|
|
void ApplySSAO(inout half occlusion, float4 texcoord) |
|
|
|
{ |
|
|
|
half ssao = 1.0 - SAMPLE_TEXTURE2D(_AmbientOcclusion, sampler_AmbientOcclusion, texcoord.xy / texcoord.w); |
|
|
|
|
|
|
|
//TODO: The occlusion term is only a half, breaking colored AO. |
|
|
|
//TODO: Find better occlusion mix method. |
|
|
|
occlusion *= lerp(_AmbientOcclusionParam.rgb, float3(1.0, 1.0, 1.0), ssao); |
|
|
|
} |
|
|
|
|
|
|
|
// Stereo-related bits |
|
|
|
#if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED) |
|
|
|
#define SCREENSPACE_TEXTURE TEXTURE2D_ARRAY |
|
|
|