1 Shader "Hidden/PostProcessing/ScalableAO"
5 #pragma exclude_renderers psp2
12 Cull Off ZWrite Off ZTest Always
14 // 0 - Occlusion estimation with CameraDepthTexture
19 #pragma vertex VertDefault
20 #pragma fragment FragAO
21 #pragma multi_compile _ APPLY_FORWARD_FOG
22 #pragma multi_compile _ FOG_LINEAR FOG_EXP FOG_EXP2
24 #include "ScalableAO.hlsl"
29 // 1 - Occlusion estimation with G-Buffer
34 #pragma vertex VertDefault
35 #pragma fragment FragAO
36 #pragma multi_compile _ APPLY_FORWARD_FOG
37 #pragma multi_compile _ FOG_LINEAR FOG_EXP FOG_EXP2
38 #define SOURCE_GBUFFER
39 #include "ScalableAO.hlsl"
44 // 2 - Separable blur (horizontal pass) with CameraDepthNormalsTexture
49 #pragma vertex VertDefault
50 #pragma fragment FragBlur
51 #define SOURCE_DEPTHNORMALS
52 #define BLUR_HORIZONTAL
53 #define BLUR_SAMPLE_CENTER_NORMAL
54 #include "ScalableAO.hlsl"
59 // 3 - Separable blur (horizontal pass) with G-Buffer
64 #pragma vertex VertDefault
65 #pragma fragment FragBlur
66 #define SOURCE_GBUFFER
67 #define BLUR_HORIZONTAL
68 #define BLUR_SAMPLE_CENTER_NORMAL
69 #include "ScalableAO.hlsl"
74 // 4 - Separable blur (vertical pass)
79 #pragma vertex VertDefault
80 #pragma fragment FragBlur
82 #include "ScalableAO.hlsl"
87 // 5 - Final composition
90 Blend Zero OneMinusSrcColor, Zero OneMinusSrcAlpha
94 #pragma vertex VertDefault
95 #pragma fragment FragComposition
96 #include "ScalableAO.hlsl"
101 // 6 - Final composition (ambient only mode)
104 Blend Zero OneMinusSrcColor, Zero OneMinusSrcAlpha
108 #pragma vertex VertDefault
109 #pragma fragment FragCompositionGBuffer
110 #include "ScalableAO.hlsl"
120 #pragma vertex VertDefault
121 #pragma fragment FragDebugOverlay
122 #include "ScalableAO.hlsl"