13 .do_static_compilation(
true)
15 .additional_info(
"eevee_shared",
"draw_view")
16 .uniform_buf(6,
"DepthOfFieldData",
"dof_buf")
17 .image(0,
GPU_RG16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_gather_lut_img")
18 .image(1,
GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_scatter_lut_img")
19 .image(2,
GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_resolve_lut_img")
20 .compute_source(
"eevee_depth_of_field_bokeh_lut_comp.glsl");
23 .do_static_compilation(
true)
25 .additional_info(
"eevee_shared",
"draw_view")
26 .uniform_buf(6,
"DepthOfFieldData",
"dof_buf")
27 .sampler(0, ImageType::FLOAT_2D,
"color_tx")
28 .sampler(1, ImageType::DEPTH_2D,
"depth_tx")
29 .image(0,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_color_img")
30 .image(1,
GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_coc_img")
31 .compute_source(
"eevee_depth_of_field_setup_comp.glsl");
34 .do_static_compilation(
true)
36 .additional_info(
"eevee_shared",
"draw_view",
"eevee_velocity_camera")
37 .uniform_buf(6,
"DepthOfFieldData",
"dof_buf")
38 .sampler(0, ImageType::FLOAT_2D,
"coc_tx")
39 .sampler(1, ImageType::FLOAT_2D,
"color_tx")
40 .sampler(2, ImageType::FLOAT_2D,
"velocity_tx")
41 .sampler(3, ImageType::FLOAT_2D,
"in_history_tx")
42 .sampler(4, ImageType::DEPTH_2D,
"depth_tx")
43 .push_constant(Type::BOOL,
"u_use_history")
44 .image(0,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_color_img")
45 .image(1,
GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_coc_img")
46 .image(2,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_history_img")
47 .compute_source(
"eevee_depth_of_field_stabilize_comp.glsl");
50 .do_static_compilation(
true)
52 .additional_info(
"eevee_shared",
"draw_view")
53 .sampler(0, ImageType::FLOAT_2D,
"color_tx")
54 .sampler(1, ImageType::FLOAT_2D,
"coc_tx")
55 .image(0,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_color_img")
56 .compute_source(
"eevee_depth_of_field_downsample_comp.glsl");
59 .do_static_compilation(
true)
61 .additional_info(
"eevee_shared",
"draw_view")
62 .uniform_buf(6,
"DepthOfFieldData",
"dof_buf")
63 .sampler(0, ImageType::FLOAT_2D,
"downsample_tx")
64 .storage_buf(0, Qualifier::WRITE,
"ScatterRect",
"scatter_fg_list_buf[]")
65 .storage_buf(1, Qualifier::WRITE,
"ScatterRect",
"scatter_bg_list_buf[]")
66 .storage_buf(2, Qualifier::READ_WRITE,
"DrawCommand",
"scatter_fg_indirect_buf")
67 .storage_buf(3, Qualifier::READ_WRITE,
"DrawCommand",
"scatter_bg_indirect_buf")
68 .image(0,
GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D,
"inout_color_lod0_img")
69 .image(1,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_color_lod1_img")
70 .image(2,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_color_lod2_img")
71 .image(3,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_color_lod3_img")
72 .image(4,
GPU_R16F, Qualifier::READ, ImageType::FLOAT_2D,
"in_coc_lod0_img")
73 .image(5,
GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_coc_lod1_img")
74 .image(6,
GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_coc_lod2_img")
75 .image(7,
GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_coc_lod3_img")
76 .compute_source(
"eevee_depth_of_field_reduce_comp.glsl");
85 .do_static_compilation(
true)
87 .additional_info(
"eevee_shared",
"draw_view")
88 .sampler(0, ImageType::FLOAT_2D,
"coc_tx")
91 .compute_source(
"eevee_depth_of_field_tiles_flatten_comp.glsl");
94 .additional_info(
"eevee_shared",
"draw_view",
"eevee_depth_of_field_tiles_common")
96 .image(2,
GPU_R11F_G11F_B10F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_tiles_fg_img")
97 .image(3,
GPU_R11F_G11F_B10F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_tiles_bg_img")
98 .push_constant(Type::INT,
"ring_count")
99 .push_constant(Type::INT,
"ring_width_multiplier")
100 .compute_source(
"eevee_depth_of_field_tiles_dilate_comp.glsl");
103 .do_static_compilation(
true)
104 .define(
"DILATE_MODE_MIN_MAX",
"false")
105 .additional_info(
"eevee_depth_of_field_tiles_dilate");
108 .do_static_compilation(
true)
109 .define(
"DILATE_MODE_MIN_MAX",
"true")
110 .additional_info(
"eevee_depth_of_field_tiles_dilate");
123 .define(
"DOF_BOKEH_TEXTURE",
"false")
128 .define(
"bokeh_lut_tx",
"color_tx");
131 .define(
"DOF_BOKEH_TEXTURE",
"true")
132 .sampler(5, ImageType::FLOAT_2D,
"bokeh_lut_tx");
137#define EEVEE_DOF_FINAL_VARIATION(name, ...) \
138 GPU_SHADER_CREATE_INFO(name).additional_info(__VA_ARGS__).do_static_compilation(true);
140#define EEVEE_DOF_LUT_VARIATIONS(prefix, ...) \
141 EEVEE_DOF_FINAL_VARIATION(prefix##_lut, "eevee_depth_of_field_lut", __VA_ARGS__) \
142 EEVEE_DOF_FINAL_VARIATION(prefix##_no_lut, "eevee_depth_of_field_no_lut", __VA_ARGS__)
144#define EEVEE_DOF_GROUND_VARIATIONS(name, ...) \
145 EEVEE_DOF_LUT_VARIATIONS(name##_background, "eevee_depth_of_field_background", __VA_ARGS__) \
146 EEVEE_DOF_LUT_VARIATIONS(name##_foreground, "eevee_depth_of_field_foreground", __VA_ARGS__)
155 .additional_info(
"eevee_shared",
157 "eevee_depth_of_field_tiles_common",
158 "eevee_sampling_data")
159 .uniform_buf(6,
"DepthOfFieldData",
"dof_buf")
161 .sampler(0, ImageType::FLOAT_2D,
"color_tx")
162 .sampler(1, ImageType::FLOAT_2D,
"color_bilinear_tx")
163 .sampler(2, ImageType::FLOAT_2D,
"coc_tx")
164 .image(2,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_color_img")
165 .image(3,
GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_weight_img");
168 .image(4,
GPU_RG16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_occlusion_img")
169 .compute_source(
"eevee_depth_of_field_gather_comp.glsl")
170 .additional_info(
"eevee_depth_of_field_gather_common");
185 .image(0,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_color_img")
197 .flat(Type::VEC4, "color_and_coc1")
198 .flat(Type::VEC4, "color_and_coc2")
199 .flat(Type::VEC4, "color_and_coc3")
200 .flat(Type::VEC4, "color_and_coc4")
202 .flat(Type::
FLOAT, "distance_scale");
213 .
sampler(0, ImageType::FLOAT_2D, "occlusion_tx")
219 .
vertex_out(eevee_depth_of_field_scatter_flat_iface)
220 .
vertex_out(eevee_depth_of_field_scatter_noperspective_iface)
239 .
sampler(0, ImageType::DEPTH_2D, "depth_tx")
241 .
sampler(2, ImageType::FLOAT_2D, "color_bg_tx")
242 .
sampler(3, ImageType::FLOAT_2D, "color_fg_tx")
243 .
sampler(4, ImageType::FLOAT_2D, "color_hole_fill_tx")
244 .
sampler(7, ImageType::FLOAT_2D, "weight_bg_tx")
245 .
sampler(8, ImageType::FLOAT_2D, "weight_fg_tx")
246 .
sampler(9, ImageType::FLOAT_2D, "weight_hole_fill_tx")
247 .
sampler(10, ImageType::FLOAT_2D, "stable_color_tx")
248 .image(2,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_color_img")
vertex_source("basic_depth_pointcloud_vert.glsl") .additional_info("draw_pointcloud")
output_img push_constant(Type::FLOAT, "subtrahend") .define("TYPE"
gbuf_header_tx eevee_sampling_data
direct_radiance_1_tx direct_radiance_3_tx indirect_radiance_2_tx radiance_feedback_img fragment_out(0, Type::VEC4, "out_combined") .additional_info("eevee_shared"
gbuf_header_tx eevee_shared
fragment_source("eevee_deferred_tile_classify_frag.glsl") .additional_info("eevee_shared"
#define DOF_DEFAULT_GROUP_SIZE
#define DOF_REDUCE_GROUP_SIZE
#define DOF_TILES_DILATE_GROUP_SIZE
#define DOF_FILTER_GROUP_SIZE
#define DOF_STABILIZE_GROUP_SIZE
#define DOF_BOKEH_LUT_SIZE
#define DOF_GATHER_GROUP_SIZE
#define DOF_RESOLVE_GROUP_SIZE
#define DOF_TILES_FLATTEN_GROUP_SIZE
flat(Type::VEC4, "color_and_coc1") .flat(Type no_perspective(Type::VEC2, "rect_uv1") .no_perspective(Type draw_view bokeh_lut_tx uniform_buf(6, "DepthOfFieldData", "dof_buf") .storage_buf(0
DOF_BOKEH_LUT_SIZE dof_buf GPU_R16F
DOF_BOKEH_LUT_SIZE additional_info("eevee_shared", "draw_view") .uniform_buf(6
DOF_RESOLVE_GROUP_SIZE specialization_constant(Type::BOOL, "do_debug_color", false) .additional_info("eevee_shared"
DOF_BOKEH_LUT_SIZE DepthOfFieldData
DOF_REDUCE_GROUP_SIZE dof_buf scatter_fg_list_buf[] storage_buf(1, Qualifier::WRITE, "ScatterRect", "scatter_bg_list_buf[]") .storage_buf(2
DOF_DEFAULT_GROUP_SIZE dof_buf sampler(0, ImageType::FLOAT_2D, "color_tx") .sampler(1
eevee_depth_of_field_no_lut
DOF_TILES_FLATTEN_GROUP_SIZE coc_tx GPU_R11F_G11F_B10F
#define EEVEE_DOF_LUT_VARIATIONS(prefix,...)
#define EEVEE_DOF_GROUND_VARIATIONS(name,...)
dof_buf color_tx coc_tx out_weight_img
dof_buf local_group_size(DOF_GATHER_GROUP_SIZE, DOF_GATHER_GROUP_SIZE) .sampler(0
do_static_compilation(true) .local_group_size(DOF_BOKEH_LUT_SIZE
DOF_DEFAULT_GROUP_SIZE dof_buf depth_tx out_coc_img compute_source("eevee_depth_of_field_setup_comp.glsl")
DOF_REDUCE_GROUP_SIZE dof_buf ScatterRect
DOF_RESOLVE_GROUP_SIZE eevee_depth_of_field_tiles_common
DOF_RESOLVE_GROUP_SIZE draw_view
DOF_STABILIZE_GROUP_SIZE dof_buf color_tx in_history_tx sampler(4, ImageType::DEPTH_2D, "depth_tx") .push_constant(Type DOF_DEFAULT_GROUP_SIZE color_tx GPU_RGBA16F
define("DOF_BOKEH_TEXTURE", "false") .define("bokeh_lut_tx"
out_color vertex_out(eevee_debug_irradiance_grid_iface) .sampler(0
no_perspective(Type::VEC2, "out_texel_xy")
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)