Blender V5.3
eevee_shadow_page_clear.bsl.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "eevee_defines.hh"
9
10namespace eevee::shadow {
11
12struct PageClear {
13 [[storage(2, read)]] const ShadowPagesInfoData &pages_infos_buf;
14 [[storage(6, read)]] const uint (&dst_coord_buf)[SHADOW_RENDER_MAP_SIZE];
16};
17
23[[compute, local_size(SHADOW_PAGE_CLEAR_GROUP_SIZE, SHADOW_PAGE_CLEAR_GROUP_SIZE)]]
25 [[global_invocation_id]] const uint3 global_id)
26{
27 /* We clear the destination pixels directly for the atomicMin technique. */
28 uint page_packed = srt.dst_coord_buf[global_id.z];
29 uint3 page_co = shadow_page_unpack(page_packed);
30 page_co.xy = page_co.xy * SHADOW_PAGE_RES + global_id.xy;
31
32 imageStoreFast(srt.shadow_atlas_img, int3(page_co), uint4(floatBitsToUint(FLT_MAX)));
33}
34
36
37} // namespace eevee::shadow
#define SHADOW_ATLAS_IMG_SLOT
#define FLT_MAX
#define storage(slot, qualifiers)
#define image(slot, qualifiers, format)
#define resource_table
#define global_invocation_id
#define compute
#define local_size(...)
VecBase< uint, D > floatBitsToUint(VecOp< float, D >) RET
ImageBase< uint, 2, true, true > uimage2DArrayAtomic
#define imageStoreFast
void page_clear_comp(PageClear &srt, const uint3 global_id)
PipelineCompute page_clear(page_clear_comp)
const ShadowPagesInfoData & pages_infos_buf
const uint(& dst_coord_buf)[SHADOW_RENDER_MAP_SIZE]