17#define SHADOW_TILE_DATA_PACKED "uint"
18#define SHADOW_PAGE_PACKED "uint"
21 .do_static_compilation(
true)
23 .storage_buf(0, Qualifier::WRITE,
"ShadowTileMapClip",
"tilemaps_clip_buf[]")
24 .push_constant(Type::INT,
"tilemaps_clip_buf_len")
25 .additional_info(
"eevee_shared")
26 .compute_source(
"eevee_shadow_clipmap_clear_comp.glsl");
29 .do_static_compilation(
true)
31 .storage_buf(
LIGHT_BUF_SLOT, Qualifier::READ_WRITE,
"LightData",
"light_buf[]")
33 .storage_buf(4, Qualifier::READ,
"uint",
"casters_id_buf[]")
34 .storage_buf(5, Qualifier::READ_WRITE,
"ShadowTileMapData",
"tilemaps_buf[]")
35 .storage_buf(6, Qualifier::READ,
"ObjectBounds",
"bounds_buf[]")
36 .storage_buf(7, Qualifier::READ_WRITE,
"ShadowTileMapClip",
"tilemaps_clip_buf[]")
37 .push_constant(Type::INT,
"resource_len")
38 .typedef_source(
"draw_shader_shared.hh")
39 .additional_info(
"eevee_shared")
40 .compute_source(
"eevee_shadow_tilemap_bounds_comp.glsl");
43 .do_static_compilation(
true)
45 .storage_buf(0, Qualifier::READ_WRITE,
"ShadowTileMapData",
"tilemaps_buf[]")
47 .storage_buf(2, Qualifier::READ_WRITE,
"ShadowTileMapClip",
"tilemaps_clip_buf[]")
48 .storage_buf(4, Qualifier::READ_WRITE,
"uvec2",
"pages_cached_buf[]")
49 .additional_info(
"eevee_shared")
50 .compute_source(
"eevee_shadow_tilemap_init_comp.glsl");
53 .do_static_compilation(
true)
54 .local_group_size(1, 1, 1)
55 .storage_buf(0, Qualifier::READ_WRITE,
"ShadowTileMapData",
"tilemaps_buf[]")
57 .storage_buf(5, Qualifier::READ,
"ObjectBounds",
"bounds_buf[]")
58 .storage_buf(6, Qualifier::READ,
"uint",
"resource_ids_buf[]")
59 .additional_info(
"eevee_shared",
"draw_view",
"draw_view_culling")
60 .compute_source(
"eevee_shadow_tag_update_comp.glsl");
63 .do_static_compilation(
true)
65 .storage_buf(5, Qualifier::READ_WRITE,
"ShadowTileMapData",
"tilemaps_buf[]")
67 .push_constant(Type::IVEC2,
"input_depth_extent")
69 "eevee_shared",
"draw_view",
"draw_view_culling",
"eevee_hiz_data",
"eevee_light_data")
70 .compute_source(
"eevee_shadow_tag_usage_comp.glsl");
73 .do_static_compilation(
true)
75 .storage_buf(6, Qualifier::READ_WRITE,
"ShadowTileMapData",
"tilemaps_buf[]")
77 .push_constant(Type::INT,
"directional_level")
78 .additional_info(
"eevee_shared",
83 "eevee_surfel_common")
84 .compute_source(
"eevee_shadow_tag_usage_surfels_comp.glsl");
87 .smooth(Type::VEC3,
"P")
88 .smooth(Type::VEC3,
"vP");
90 .flat(Type::VEC3,
"ls_aabb_min")
91 .flat(Type::VEC3,
"ls_aabb_max");
94 .do_static_compilation(
true)
95 .vertex_in(0, Type::VEC3,
"pos")
96 .storage_buf(4, Qualifier::READ,
"ObjectBounds",
"bounds_buf[]")
97 .storage_buf(5, Qualifier::READ_WRITE,
"ShadowTileMapData",
"tilemaps_buf[]")
99 .push_constant(Type::IVEC2,
"fb_resolution")
100 .push_constant(Type::INT,
"fb_lod")
101 .vertex_out(eevee_shadow_tag_transparent_iface)
102 .vertex_out(eevee_shadow_tag_transparent_flat_iface)
103 .additional_info(
"eevee_shared",
104 "draw_resource_id_varying",
110 .vertex_source(
"eevee_shadow_tag_usage_vert.glsl")
111 .fragment_source(
"eevee_shadow_tag_usage_frag.glsl");
114 .do_static_compilation(
true)
116 .storage_buf(4, Qualifier::READ_WRITE,
"ShadowTileMapData",
"tilemaps_buf[]")
118 .additional_info(
"eevee_volume_properties_data",
124 "eevee_sampling_data")
125 .compute_source(
"eevee_shadow_tag_usage_volume_comp.glsl");
128 .do_static_compilation(
true)
130 .push_constant(Type::INT,
"max_view_per_tilemap")
131 .storage_buf(0, Qualifier::READ_WRITE,
"ShadowTileMapData",
"tilemaps_buf[]")
133 .additional_info(
"eevee_shared")
134 .compute_source(
"eevee_shadow_page_mask_comp.glsl");
137 .do_static_compilation(
true)
139 .storage_buf(0, Qualifier::READ_WRITE,
"ShadowTileMapData",
"tilemaps_buf[]")
141 .storage_buf(2, Qualifier::READ_WRITE,
"ShadowPagesInfoData",
"pages_infos_buf")
142 .storage_buf(3, Qualifier::READ_WRITE,
"uint",
"pages_free_buf[]")
143 .storage_buf(4, Qualifier::READ_WRITE,
"uvec2",
"pages_cached_buf[]")
144 .additional_info(
"eevee_shared")
145 .compute_source(
"eevee_shadow_page_free_comp.glsl");
148 .do_static_compilation(
true)
150 .typedef_source(
"draw_shader_shared.hh")
152 .storage_buf(2, Qualifier::READ_WRITE,
"ShadowPagesInfoData",
"pages_infos_buf")
153 .storage_buf(3, Qualifier::READ_WRITE,
"uint",
"pages_free_buf[]")
154 .storage_buf(4, Qualifier::READ_WRITE,
"uvec2",
"pages_cached_buf[]")
155 .storage_buf(5, Qualifier::WRITE,
"DispatchCommand",
"clear_dispatch_buf")
156 .storage_buf(6, Qualifier::WRITE,
"DrawCommand",
"tile_draw_buf")
157 .storage_buf(7, Qualifier::READ_WRITE,
"ShadowStatistics",
"statistics_buf")
158 .additional_info(
"eevee_shared")
159 .compute_source(
"eevee_shadow_page_defrag_comp.glsl");
162 .do_static_compilation(
true)
164 .typedef_source(
"draw_shader_shared.hh")
165 .storage_buf(0, Qualifier::READ_WRITE,
"ShadowTileMapData",
"tilemaps_buf[]")
167 .storage_buf(2, Qualifier::READ_WRITE,
"ShadowPagesInfoData",
"pages_infos_buf")
168 .storage_buf(3, Qualifier::READ_WRITE,
"uint",
"pages_free_buf[]")
169 .storage_buf(4, Qualifier::READ_WRITE,
"uvec2",
"pages_cached_buf[]")
170 .storage_buf(6, Qualifier::READ_WRITE,
"ShadowStatistics",
"statistics_buf")
171 .additional_info(
"eevee_shared")
172 .compute_source(
"eevee_shadow_page_allocate_comp.glsl");
175 .do_static_compilation(
true)
176 .typedef_source(
"draw_shader_shared.hh")
178 .storage_buf(0, Qualifier::READ,
"ShadowTileMapData",
"tilemaps_buf[]")
180 .storage_buf(2, Qualifier::READ_WRITE,
"ShadowPagesInfoData",
"pages_infos_buf")
181 .storage_buf(3, Qualifier::READ_WRITE,
"ShadowStatistics",
"statistics_buf")
182 .storage_buf(4, Qualifier::WRITE,
"ViewMatrices",
"view_infos_buf[SHADOW_VIEW_MAX]")
183 .storage_buf(5, Qualifier::WRITE,
"ShadowRenderView",
"render_view_buf[SHADOW_VIEW_MAX]")
184 .storage_buf(6, Qualifier::READ,
"ShadowTileMapClip",
"tilemaps_clip_buf[]")
185 .image(0,
GPU_R32UI, Qualifier::WRITE, ImageType::UINT_2D,
"tilemaps_img")
186 .additional_info(
"eevee_shared")
187 .compute_source(
"eevee_shadow_tilemap_finalize_comp.glsl");
190 .do_static_compilation(
true)
191 .typedef_source(
"draw_shader_shared.hh")
193 .storage_buf(0, Qualifier::READ_WRITE,
"ShadowStatistics",
"statistics_buf")
194 .storage_buf(1, Qualifier::READ,
"ShadowRenderView",
"render_view_buf[SHADOW_VIEW_MAX]")
196 .storage_buf(3, Qualifier::READ_WRITE,
"DispatchCommand",
"clear_dispatch_buf")
197 .storage_buf(4, Qualifier::READ_WRITE,
"DrawCommand",
"tile_draw_buf")
200 .storage_buf(7, Qualifier::WRITE,
SHADOW_PAGE_PACKED,
"render_map_buf[SHADOW_RENDER_MAP_SIZE]")
201 .additional_info(
"eevee_shared")
202 .compute_source(
"eevee_shadow_tilemap_rendermap_comp.glsl");
205 .do_static_compilation(
true)
207 .image(0,
GPU_R32UI, Qualifier::READ_WRITE, ImageType::UINT_2D,
"tilemaps_img")
211 .storage_buf(4, Qualifier::READ,
"ShadowTileMapData",
"tilemaps_buf[]")
212 .additional_info(
"eevee_shared",
"draw_view")
213 .compute_source(
"eevee_shadow_tilemap_amend_comp.glsl");
217 .do_static_compilation(
true)
219 .storage_buf(2, Qualifier::READ,
"ShadowPagesInfoData",
"pages_infos_buf")
220 .storage_buf(6, Qualifier::READ,
SHADOW_PAGE_PACKED,
"dst_coord_buf[SHADOW_RENDER_MAP_SIZE]")
221 .additional_info(
"eevee_shared")
222 .compute_source(
"eevee_shadow_page_clear_comp.glsl")
225 Qualifier::READ_WRITE,
226 ImageType::UINT_2D_ARRAY_ATOMIC,
231 .do_static_compilation(
true)
232 .define(
"PASS_CLEAR")
233 .additional_info(
"eevee_shared")
234 .builtins(BuiltinBits::VIEWPORT_INDEX | BuiltinBits::LAYER)
235 .storage_buf(8, Qualifier::READ,
SHADOW_PAGE_PACKED,
"src_coord_buf[SHADOW_RENDER_MAP_SIZE]")
236 .vertex_source(
"eevee_shadow_page_tile_vert.glsl")
237 .fragment_source(
"eevee_shadow_page_tile_frag.glsl")
238 .fragment_out(0, Type::FLOAT,
"out_tile_depth", DualBlend::NONE,
SHADOW_ROG_ID);
242# define PAGE_Z_TYPE Type::USHORT
244# define PAGE_Z_TYPE Type::UINT
249 .no_perspective(Type::VEC2,
"out_texel_xy");
257 .do_static_compilation(
true)
258 .define(
"PASS_DEPTH_STORE")
259 .additional_info(
"eevee_shared")
260 .builtins(BuiltinBits::VIEWPORT_INDEX | BuiltinBits::LAYER)
261 .storage_buf(7, Qualifier::READ,
SHADOW_PAGE_PACKED,
"dst_coord_buf[SHADOW_RENDER_MAP_SIZE]")
262 .storage_buf(8, Qualifier::READ,
SHADOW_PAGE_PACKED,
"src_coord_buf[SHADOW_RENDER_MAP_SIZE]")
266 Qualifier::READ_WRITE,
267 ImageType::UINT_2D_ARRAY,
269 .vertex_out(eevee_shadow_page_tile_store_noperspective_iface)
270 .vertex_out(eevee_shadow_page_tile_store_flat_iface)
271 .vertex_source(
"eevee_shadow_page_tile_vert.glsl")
272 .fragment_source(
"eevee_shadow_page_tile_frag.glsl");
276 .do_static_compilation(
true)
277 .typedef_source(
"eevee_defines.hh")
278 .typedef_source(
"eevee_shader_shared.hh")
281 .storage_buf(0, Qualifier::READ,
"ObjectBounds",
"bounds_buf[]")
282 .storage_buf(1, Qualifier::READ_WRITE,
"uint",
"visibility_buf[]")
283 .storage_buf(2, Qualifier::READ,
"ShadowRenderView",
"render_view_buf[SHADOW_VIEW_MAX]")
284 .push_constant(Type::INT,
"resource_len")
285 .push_constant(Type::INT,
"view_len")
286 .push_constant(Type::INT,
"visibility_word_per_draw")
287 .compute_source(
"eevee_shadow_visibility_comp.glsl")
288 .additional_info(
"draw_view",
"draw_view_culling",
"draw_object_infos_new");
299 .define(
"SHADOW_READ_ATOMIC")
300 .builtins(BuiltinBits::TEXTURE_ATOMIC)
315 .do_static_compilation(
true)
316 .additional_info(
"eevee_shared")
317 .storage_buf(5, Qualifier::READ,
"ShadowTileMapData",
"tilemaps_buf[]")
319 .fragment_out(0, Type::VEC4,
"out_color_add", DualBlend::SRC_0)
320 .fragment_out(0, Type::VEC4,
"out_color_mul", DualBlend::SRC_1)
321 .push_constant(Type::INT,
"debug_mode")
322 .push_constant(Type::INT,
"debug_tilemap_index")
323 .depth_write(DepthWrite::ANY)
324 .fragment_source(
"eevee_shadow_debug_frag.glsl")
326 "draw_fullscreen",
"draw_view",
"eevee_hiz_data",
"eevee_light_data",
"eevee_shadow_data");
#define DRW_VISIBILITY_GROUP_SIZE
gbuf_header_tx eevee_shadow_data
#define SURFEL_GROUP_SIZE
#define SHADOW_TILEMAP_RES
#define SHADOW_PAGE_CLEAR_GROUP_SIZE
#define SHADOW_CLIPMAP_GROUP_SIZE
#define SHADOW_TILEMAP_LOD0_LEN
#define SHADOW_DEPTH_SCAN_GROUP_SIZE
#define SHADOW_ATLAS_TEX_SLOT
#define SHADOW_BOUNDS_GROUP_SIZE
#define SHADOW_ATLAS_IMG_SLOT
#define LIGHT_CULL_BUF_SLOT
#define SHADOW_TILEMAPS_TEX_SLOT
#define SHADOW_PAGE_PACKED
#define SHADOW_TILE_DATA_PACKED
SHADOW_TILEMAP_RES tiles_buf[] statistics_buf render_view_buf[SHADOW_VIEW_MAX] GPU_R32UI
tilemaps_buf[] storage_buf(7, Qualifier::READ_WRITE, SHADOW_TILE_DATA_PACKED, "tiles_buf[]") .push_constant(Type smooth(Type::VEC3, "P") .smooth(Type flat(Type::VEC3, "ls_aabb_min") .flat(Type pos tilemaps_buf[] storage_buf(6, Qualifier::READ_WRITE, SHADOW_TILE_DATA_PACKED, "tiles_buf[]") .push_constant(Type VOLUME_GROUP_SIZE
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)