experiments with fresnel and shadergraph
[WindSway-HDRP.git] / Library / PackageCache / com.unity.postprocessing@2.1.6 / PostProcessing / Shaders / Builtins / ScalableAO.shader
blob3ff5ea0a982210537e3a85104ca92e3074cae187
1 Shader "Hidden/PostProcessing/ScalableAO"
3     HLSLINCLUDE
5         #pragma exclude_renderers psp2
6         #pragma target 3.0
7   
8     ENDHLSL
10     SubShader
11     {
12         Cull Off ZWrite Off ZTest Always
14         // 0 - Occlusion estimation with CameraDepthTexture
15         Pass
16         {
17             HLSLPROGRAM
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
23                 #define SOURCE_DEPTH
24                 #include "ScalableAO.hlsl"
26             ENDHLSL
27         }
29         // 1 - Occlusion estimation with G-Buffer
30         Pass
31         {
32             HLSLPROGRAM
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"
41             ENDHLSL
42         }
44         // 2 - Separable blur (horizontal pass) with CameraDepthNormalsTexture
45         Pass
46         {
47             HLSLPROGRAM
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"
56             ENDHLSL
57         }
59         // 3 - Separable blur (horizontal pass) with G-Buffer
60         Pass
61         {
62             HLSLPROGRAM
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"
71             ENDHLSL
72         }
74         // 4 - Separable blur (vertical pass)
75         Pass
76         {
77             HLSLPROGRAM
79                 #pragma vertex VertDefault
80                 #pragma fragment FragBlur
81                 #define BLUR_VERTICAL
82                 #include "ScalableAO.hlsl"
84             ENDHLSL
85         }
87         // 5 - Final composition
88         Pass
89         {
90             Blend Zero OneMinusSrcColor, Zero OneMinusSrcAlpha
92             HLSLPROGRAM
94                 #pragma vertex VertDefault
95                 #pragma fragment FragComposition
96                 #include "ScalableAO.hlsl"
98             ENDHLSL
99         }
101         // 6 - Final composition (ambient only mode)
102         Pass
103         {
104             Blend Zero OneMinusSrcColor, Zero OneMinusSrcAlpha
106             HLSLPROGRAM
108                 #pragma vertex VertDefault
109                 #pragma fragment FragCompositionGBuffer
110                 #include "ScalableAO.hlsl"
112             ENDHLSL
113         }
115         // 7 - Debug overlay
116         Pass
117         {
118             HLSLPROGRAM
120                 #pragma vertex VertDefault
121                 #pragma fragment FragDebugOverlay
122                 #include "ScalableAO.hlsl"
124             ENDHLSL
125         }
126     }