1 Shader "Hidden/PostProcessing/DepthOfField"
3 // SubShader with SM 5.0 support
4 // DX11+, OpenGL 4.3+, OpenGL ES 3.1+AEP, Vulkan, consoles
5 // Gather intrinsics are used to reduce texture sample count.
8 Cull Off ZWrite Off ZTest Always
12 Name "CoC Calculation"
16 #pragma vertex VertDefault
17 #pragma fragment FragCoC
18 #include "DepthOfField.hlsl"
24 Name "CoC Temporal Filter"
28 #pragma vertex VertDefault
29 #pragma fragment FragTempFilter
30 #include "DepthOfField.hlsl"
36 Name "Downsample and Prefilter"
40 #pragma vertex VertDefault
41 #pragma fragment FragPrefilter
42 #include "DepthOfField.hlsl"
48 Name "Bokeh Filter (small)"
52 #pragma vertex VertDefault
53 #pragma fragment FragBlur
55 #include "DepthOfField.hlsl"
61 Name "Bokeh Filter (medium)"
65 #pragma vertex VertDefault
66 #pragma fragment FragBlur
68 #include "DepthOfField.hlsl"
74 Name "Bokeh Filter (large)"
78 #pragma vertex VertDefault
79 #pragma fragment FragBlur
81 #include "DepthOfField.hlsl"
87 Name "Bokeh Filter (very large)"
91 #pragma vertex VertDefault
92 #pragma fragment FragBlur
93 #define KERNEL_VERYLARGE
94 #include "DepthOfField.hlsl"
104 #pragma vertex VertDefault
105 #pragma fragment FragPostBlur
106 #include "DepthOfField.hlsl"
116 #pragma vertex VertDefault
117 #pragma fragment FragCombine
118 #include "DepthOfField.hlsl"
128 #pragma vertex VertDefault
129 #pragma fragment FragDebugOverlay
130 #include "DepthOfField.hlsl"
135 // Fallback SubShader with SM 3.5
136 // DX11+, OpenGL 3.2+, OpenGL ES 3+, Metal, Vulkan, consoles
139 Cull Off ZWrite Off ZTest Always
143 Name "CoC Calculation"
147 #pragma vertex VertDefault
148 #pragma fragment FragCoC
149 #include "DepthOfField.hlsl"
155 Name "CoC Temporal Filter"
159 #pragma vertex VertDefault
160 #pragma fragment FragTempFilter
161 #include "DepthOfField.hlsl"
167 Name "Downsample and Prefilter"
171 #pragma vertex VertDefault
172 #pragma fragment FragPrefilter
173 #include "DepthOfField.hlsl"
179 Name "Bokeh Filter (small)"
183 #pragma vertex VertDefault
184 #pragma fragment FragBlur
186 #include "DepthOfField.hlsl"
192 Name "Bokeh Filter (medium)"
196 #pragma vertex VertDefault
197 #pragma fragment FragBlur
198 #define KERNEL_MEDIUM
199 #include "DepthOfField.hlsl"
205 Name "Bokeh Filter (large)"
209 #pragma vertex VertDefault
210 #pragma fragment FragBlur
212 #include "DepthOfField.hlsl"
218 Name "Bokeh Filter (very large)"
222 #pragma vertex VertDefault
223 #pragma fragment FragBlur
224 #define KERNEL_VERYLARGE
225 #include "DepthOfField.hlsl"
235 #pragma vertex VertDefault
236 #pragma fragment FragPostBlur
237 #include "DepthOfField.hlsl"
247 #pragma vertex VertDefault
248 #pragma fragment FragCombine
249 #include "DepthOfField.hlsl"
259 #pragma vertex VertDefault
260 #pragma fragment FragDebugOverlay
261 #include "DepthOfField.hlsl"