29 ShadowTileMapData tilemap_data = tilemaps.tilemaps_buf[global_id.z];
31 uint tile_start = uint(tilemap_data.tiles_index);
32 for (
int lod = 0; lod <= SHADOW_TILEMAP_LOD; lod++) {
33 uint lod_len = uint(SHADOW_TILEMAP_LOD0_LEN >> (lod * 2));
34 if (local_tile < lod_len) {
37 ShadowTileData
tile = shadow_tile_unpack(allocator.tiles_buf[
tile_index]);
38 if (
tile.is_used && !
tile.is_allocated) {
39 allocator.page_alloc(
tile);
44 atomicAdd(stats.statistics_buf.page_used_count, 1);
46 if (
tile.is_used &&
tile.do_update) {
47 atomicAdd(stats.statistics_buf.page_update_count, 1);
49 if (
tile.is_allocated) {
50 atomicAdd(stats.statistics_buf.page_allocated_count, 1);
53 tile_start += lod_len;