Blender V4.3
eevee_hiz_info.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#include "eevee_defines.hh"
7
9 .sampler(HIZ_TEX_SLOT, ImageType::FLOAT_2D, "hiz_tx")
10 .additional_info("eevee_global_ubo");
11
12GPU_SHADER_CREATE_INFO(eevee_hiz_update_base)
13 .local_group_size(FILM_GROUP_SIZE, FILM_GROUP_SIZE)
14 .storage_buf(0, Qualifier::READ_WRITE, "uint", "finished_tile_counter")
15 .image(0, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_mip_0")
16 .image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_mip_1")
17 .image(2, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_mip_2")
18 .image(3, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_mip_3")
19 .image(4, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_mip_4")
20 .image(5, GPU_R32F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "out_mip_5")
21 .image(6, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D, "out_mip_6")
22 .specialization_constant(Type::BOOL, "update_mip_0", true)
23 .compute_source("eevee_hiz_update_comp.glsl");
24
25GPU_SHADER_CREATE_INFO(eevee_hiz_update)
26 .do_static_compilation(true)
27 .sampler(0, ImageType::DEPTH_2D, "depth_tx")
28 .additional_info("eevee_hiz_update_base");
29
30GPU_SHADER_CREATE_INFO(eevee_hiz_update_layer)
31 .do_static_compilation(true)
32 .define("HIZ_LAYER")
33 .sampler(1, ImageType::DEPTH_2D_ARRAY, "depth_layered_tx")
34 .push_constant(Type::INT, "layer_id")
35 .additional_info("eevee_hiz_update_base");
36
37GPU_SHADER_CREATE_INFO(eevee_hiz_debug)
38 .do_static_compilation(true)
39 .fragment_out(0, Type::VEC4, "out_debug_color_add", DualBlend::SRC_0)
40 .fragment_out(0, Type::VEC4, "out_debug_color_mul", DualBlend::SRC_1)
41 .fragment_source("eevee_hiz_debug_frag.glsl")
42 .additional_info("eevee_shared", "eevee_hiz_data", "draw_fullscreen");
#define FILM_GROUP_SIZE
#define HIZ_TEX_SLOT
DualBlend::SRC_0 eevee_hiz_data
finished_tile_counter GPU_R32F
#define GPU_SHADER_CREATE_INFO(_info)