12#define image_out(slot, format, type, name) \
13 image(slot, format, Qualifier::WRITE, type, name, Frequency::PASS)
14#define image_in(slot, format, type, name) \
15 image(slot, format, Qualifier::READ, type, name, Frequency::PASS)
18 .do_static_compilation(
true)
20 .additional_info(
"eevee_shared",
"eevee_gbuffer_data",
"eevee_global_ubo")
21 .typedef_source(
"draw_shader_shared.hh")
26 .compute_source(
"eevee_ray_tile_classify_comp.glsl");
29 .do_static_compilation(
true)
31 .additional_info(
"eevee_shared",
"eevee_global_ubo")
32 .typedef_source(
"draw_shader_shared.hh")
35 .storage_buf(0, Qualifier::READ_WRITE,
"DispatchCommand",
"raytrace_tracing_dispatch_buf")
36 .storage_buf(1, Qualifier::READ_WRITE,
"DispatchCommand",
"raytrace_denoise_dispatch_buf")
37 .storage_buf(4, Qualifier::WRITE,
"uint",
"raytrace_tracing_tiles_buf[]")
38 .storage_buf(5, Qualifier::WRITE,
"uint",
"raytrace_denoise_tiles_buf[]")
39 .specialization_constant(Type::INT,
"closure_index", 0)
40 .specialization_constant(Type::INT,
"resolution_scale", 2)
41 .compute_source(
"eevee_ray_tile_compact_comp.glsl");
44 .do_static_compilation(
true)
46 .additional_info(
"eevee_shared",
49 "eevee_sampling_data",
51 "eevee_utility_texture")
52 .image(0,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_ray_data_img")
53 .storage_buf(4, Qualifier::READ,
"uint",
"tiles_coord_buf[]")
54 .specialization_constant(Type::INT,
"closure_index", 0)
55 .compute_source(
"eevee_ray_generate_comp.glsl");
58 .do_static_compilation(
true)
60 .additional_info(
"eevee_shared",
64 "eevee_sampling_data",
65 "eevee_lightprobe_data")
66 .image(0,
GPU_RGBA16F, Qualifier::READ, ImageType::FLOAT_2D,
"ray_data_img")
69 .sampler(1, ImageType::DEPTH_2D,
"depth_tx")
70 .storage_buf(5, Qualifier::READ,
"uint",
"tiles_coord_buf[]")
71 .specialization_constant(Type::INT,
"closure_index", 0)
72 .compute_source(
"eevee_ray_trace_fallback_comp.glsl");
75 .do_static_compilation(
true)
77 .define(
"PLANAR_PROBES")
78 .additional_info(
"eevee_shared",
80 "eevee_sampling_data",
83 "eevee_lightprobe_data",
84 "eevee_lightprobe_planar_data")
85 .image(0,
GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D,
"ray_data_img")
88 .sampler(2, ImageType::DEPTH_2D,
"depth_tx")
89 .storage_buf(5, Qualifier::READ,
"uint",
"tiles_coord_buf[]")
90 .specialization_constant(Type::INT,
"closure_index", 0)
91 .compute_source(
"eevee_ray_trace_planar_comp.glsl");
94 .do_static_compilation(
true)
96 .additional_info(
"eevee_shared",
98 "eevee_sampling_data",
102 "eevee_lightprobe_data")
103 .image(0,
GPU_RGBA16F, Qualifier::READ, ImageType::FLOAT_2D,
"ray_data_img")
106 .sampler(0, ImageType::DEPTH_2D,
"depth_tx")
107 .sampler(1, ImageType::FLOAT_2D,
"radiance_front_tx")
108 .sampler(2, ImageType::FLOAT_2D,
"radiance_back_tx")
109 .sampler(4, ImageType::FLOAT_2D,
"hiz_front_tx")
110 .sampler(5, ImageType::FLOAT_2D,
"hiz_back_tx")
111 .storage_buf(5, Qualifier::READ,
"uint",
"tiles_coord_buf[]")
112 .compute_source(
"eevee_ray_trace_screen_comp.glsl")
114 .mtl_max_total_threads_per_threadgroup(400)
115 .specialization_constant(Type::BOOL,
"trace_refraction",
true)
116 .specialization_constant(Type::INT,
"closure_index", 0)
117 .compute_source(
"eevee_ray_trace_screen_comp.glsl");
120 .do_static_compilation(
true)
122 .additional_info(
"eevee_shared",
123 "eevee_gbuffer_data",
125 "eevee_sampling_data",
127 "eevee_utility_texture")
128 .sampler(3, ImageType::DEPTH_2D,
"depth_tx")
129 .image(0,
GPU_RGBA16F, Qualifier::READ, ImageType::FLOAT_2D,
"ray_data_img")
134 .image(5,
GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_hit_depth_img")
136 .storage_buf(4, Qualifier::READ,
"uint",
"tiles_coord_buf[]")
138 .mtl_max_total_threads_per_threadgroup(316)
139 .specialization_constant(Type::INT,
"raytrace_resolution_scale", 2)
140 .specialization_constant(Type::BOOL,
"skip_denoise",
false)
141 .specialization_constant(Type::INT,
"closure_index", 0)
142 .compute_source(
"eevee_ray_denoise_spatial_comp.glsl");
145 .do_static_compilation(
true)
147 .additional_info(
"eevee_shared",
"eevee_global_ubo",
"draw_view")
148 .sampler(0, ImageType::FLOAT_2D,
"radiance_history_tx")
149 .sampler(1, ImageType::FLOAT_2D,
"variance_history_tx")
150 .sampler(2, ImageType::UINT_2D_ARRAY,
"tilemask_history_tx")
151 .sampler(3, ImageType::DEPTH_2D,
"depth_tx")
152 .image(0,
GPU_R32F, Qualifier::READ, ImageType::FLOAT_2D,
"hit_depth_img")
157 .storage_buf(4, Qualifier::READ,
"uint",
"tiles_coord_buf[]")
158 .compute_source(
"eevee_ray_denoise_temporal_comp.glsl")
160 .mtl_max_total_threads_per_threadgroup(512)
161 .specialization_constant(Type::INT,
"closure_index", 0)
162 .compute_source(
"eevee_ray_denoise_temporal_comp.glsl");
165 .do_static_compilation(
true)
167 .additional_info(
"eevee_shared",
168 "eevee_gbuffer_data",
170 "eevee_sampling_data",
172 .sampler(1, ImageType::DEPTH_2D,
"depth_tx")
177 .storage_buf(4, Qualifier::READ,
"uint",
"tiles_coord_buf[]")
178 .specialization_constant(Type::INT,
"closure_index", 0)
179 .compute_source(
"eevee_ray_denoise_bilateral_comp.glsl");
182 .do_static_compilation(
true)
184 .additional_info(
"eevee_shared",
"eevee_gbuffer_data",
"eevee_global_ubo",
"draw_view")
185 .sampler(0, ImageType::DEPTH_2D,
"depth_tx")
186 .sampler(1, ImageType::FLOAT_2D,
"in_radiance_tx")
188 .image(3,
GPU_RGB10_A2, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_normal_img")
189 .compute_source(
"eevee_horizon_setup_comp.glsl");
192 .do_static_compilation(
true)
194 .additional_info(
"eevee_shared",
195 "eevee_gbuffer_data",
197 "eevee_sampling_data",
198 "eevee_utility_texture",
201 .specialization_constant(Type::INT,
"fast_gi_slice_count", 2)
202 .specialization_constant(Type::INT,
"fast_gi_step_count", 8)
203 .specialization_constant(Type::BOOL,
"fast_gi_ao_only",
false)
204 .sampler(0, ImageType::FLOAT_2D,
"screen_radiance_tx")
205 .sampler(1, ImageType::FLOAT_2D,
"screen_normal_tx")
206 .image(2,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"horizon_radiance_0_img")
207 .image(3,
GPU_RGBA8, Qualifier::WRITE, ImageType::FLOAT_2D,
"horizon_radiance_1_img")
208 .image(4,
GPU_RGBA8, Qualifier::WRITE, ImageType::FLOAT_2D,
"horizon_radiance_2_img")
209 .image(5,
GPU_RGBA8, Qualifier::WRITE, ImageType::FLOAT_2D,
"horizon_radiance_3_img")
210 .storage_buf(7, Qualifier::READ,
"uint",
"tiles_coord_buf[]")
212 .mtl_max_total_threads_per_threadgroup(400)
213 .compute_source(
"eevee_horizon_scan_comp.glsl");
216 .do_static_compilation(
true)
219 "eevee_shared",
"eevee_global_ubo",
"eevee_sampling_data",
"eevee_hiz_data",
"draw_view")
220 .sampler(2, ImageType::FLOAT_2D,
"in_sh_0_tx")
221 .sampler(4, ImageType::FLOAT_2D,
"in_sh_1_tx")
222 .sampler(5, ImageType::FLOAT_2D,
"in_sh_2_tx")
223 .sampler(6, ImageType::FLOAT_2D,
"in_sh_3_tx")
224 .sampler(7, ImageType::FLOAT_2D,
"screen_normal_tx")
225 .image(2,
GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_sh_0_img")
226 .image(3,
GPU_RGBA8, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_sh_1_img")
227 .image(4,
GPU_RGBA8, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_sh_2_img")
228 .image(5,
GPU_RGBA8, Qualifier::WRITE, ImageType::FLOAT_2D,
"out_sh_3_img")
229 .storage_buf(7, Qualifier::READ,
"uint",
"tiles_coord_buf[]")
230 .compute_source(
"eevee_horizon_denoise_comp.glsl");
233 .do_static_compilation(
true)
235 .additional_info(
"eevee_shared",
236 "eevee_gbuffer_data",
238 "eevee_sampling_data",
239 "eevee_lightprobe_data",
241 .sampler(1, ImageType::DEPTH_2D,
"depth_tx")
242 .sampler(2, ImageType::FLOAT_2D,
"horizon_radiance_0_tx")
243 .sampler(3, ImageType::FLOAT_2D,
"horizon_radiance_1_tx")
244 .sampler(4, ImageType::FLOAT_2D,
"horizon_radiance_2_tx")
245 .sampler(5, ImageType::FLOAT_2D,
"horizon_radiance_3_tx")
246 .sampler(8, ImageType::FLOAT_2D,
"screen_normal_tx")
250 .storage_buf(7, Qualifier::READ,
"uint",
"tiles_coord_buf[]")
252 .mtl_max_total_threads_per_threadgroup(400)
253 .compute_source(
"eevee_horizon_resolve_comp.glsl");
#define RAYTRACE_GROUP_SIZE
RAYTRACE_GROUP_SIZE eevee_lightprobe_planar_data ray_time_img depth_tx storage_buf(5, Qualifier::READ, "uint", "tiles_coord_buf[]") .specialization_constant(Type RAYTRACE_GROUP_SIZE ray_data_img ray_radiance_img radiance_front_tx hiz_front_tx tiles_coord_buf[] compute_source("eevee_ray_trace_screen_comp.glsl") .mtl_max_total_threads_per_threadgroup(400) .specialization_constant(Type RAYTRACE_GROUP_SIZE depth_tx ray_time_img out_radiance_img GPU_R32F
RAYTRACE_GROUP_SIZE eevee_lightprobe_planar_data RAYTRACE_RAYTIME_FORMAT
RAYTRACE_GROUP_SIZE eevee_lightprobe_planar_data ray_time_img depth_tx storage_buf(5, Qualifier::READ, "uint", "tiles_coord_buf[]") .specialization_constant(Type RAYTRACE_GROUP_SIZE ray_data_img ray_radiance_img radiance_front_tx hiz_front_tx tiles_coord_buf[] compute_source("eevee_ray_trace_screen_comp.glsl") .mtl_max_total_threads_per_threadgroup(400) .specialization_constant(Type RAYTRACE_GROUP_SIZE depth_tx ray_time_img out_radiance_img out_hit_depth_img tiles_coord_buf[] mtl_max_total_threads_per_threadgroup(316) .specialization_constant(Type RAYTRACE_GROUP_SIZE radiance_history_tx tilemask_history_tx hit_depth_img out_radiance_img RAYTRACE_VARIANCE_FORMAT
RAYTRACE_GROUP_SIZE tile_raytrace_denoise_img raytrace_tracing_dispatch_buf raytrace_tracing_tiles_buf[] storage_buf(5, Qualifier::WRITE, "uint", "raytrace_denoise_tiles_buf[]") .specialization_constant(Type RAYTRACE_GROUP_SIZE GPU_RGBA16F
RAYTRACE_GROUP_SIZE tile_raytrace_denoise_img raytrace_tracing_dispatch_buf raytrace_tracing_tiles_buf[] storage_buf(5, Qualifier::WRITE, "uint", "raytrace_denoise_tiles_buf[]") .specialization_constant(Type RAYTRACE_GROUP_SIZE out_ray_data_img storage_buf(4, Qualifier::READ, "uint", "tiles_coord_buf[]") .specialization_constant(Type RAYTRACE_GROUP_SIZE ray_data_img RAYTRACE_RADIANCE_FORMAT
RAYTRACE_GROUP_SIZE additional_info("eevee_shared", "eevee_gbuffer_data", "eevee_global_ubo", "eevee_sampling_data", "eevee_utility_texture", "eevee_hiz_data", "draw_view") .specialization_constant(Type RAYTRACE_GROUP_SIZE in_sh_0_tx in_sh_2_tx screen_normal_tx GPU_RGBA8
RAYTRACE_GROUP_SIZE RAYTRACE_TILEMASK_FORMAT
#define GPU_SHADER_CREATE_INFO(_info)