Blender V4.3
compositor_keying_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
6
7GPU_SHADER_CREATE_INFO(compositor_keying_extract_chroma)
8 .local_group_size(16, 16)
9 .sampler(0, ImageType::FLOAT_2D, "input_tx")
10 .image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
11 .compute_source("compositor_keying_extract_chroma.glsl")
12 .do_static_compilation(true);
13
14GPU_SHADER_CREATE_INFO(compositor_keying_replace_chroma)
15 .local_group_size(16, 16)
16 .sampler(0, ImageType::FLOAT_2D, "input_tx")
17 .sampler(1, ImageType::FLOAT_2D, "new_chroma_tx")
18 .image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
19 .compute_source("compositor_keying_replace_chroma.glsl")
20 .do_static_compilation(true);
21
22GPU_SHADER_CREATE_INFO(compositor_keying_compute_matte)
23 .local_group_size(16, 16)
24 .push_constant(Type::FLOAT, "key_balance")
25 .sampler(0, ImageType::FLOAT_2D, "input_tx")
26 .sampler(1, ImageType::FLOAT_2D, "key_tx")
27 .image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
28 .compute_source("compositor_keying_compute_matte.glsl")
29 .do_static_compilation(true);
30
31GPU_SHADER_CREATE_INFO(compositor_keying_tweak_matte)
32 .local_group_size(16, 16)
33 .push_constant(Type::BOOL, "compute_edges")
34 .push_constant(Type::BOOL, "apply_core_matte")
35 .push_constant(Type::BOOL, "apply_garbage_matte")
36 .push_constant(Type::INT, "edge_search_radius")
37 .push_constant(Type::FLOAT, "edge_tolerance")
38 .push_constant(Type::FLOAT, "black_level")
39 .push_constant(Type::FLOAT, "white_level")
40 .sampler(0, ImageType::FLOAT_2D, "input_matte_tx")
41 .sampler(1, ImageType::FLOAT_2D, "garbage_matte_tx")
42 .sampler(2, ImageType::FLOAT_2D, "core_matte_tx")
43 .image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_matte_img")
44 .image(1, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_edges_img")
45 .compute_source("compositor_keying_tweak_matte.glsl")
46 .do_static_compilation(true);
47
48GPU_SHADER_CREATE_INFO(compositor_keying_compute_image)
49 .local_group_size(16, 16)
50 .push_constant(Type::FLOAT, "despill_factor")
51 .push_constant(Type::FLOAT, "despill_balance")
52 .sampler(0, ImageType::FLOAT_2D, "input_tx")
53 .sampler(1, ImageType::FLOAT_2D, "matte_tx")
54 .sampler(2, ImageType::FLOAT_2D, "key_tx")
55 .image(0, GPU_R16F, Qualifier::WRITE, ImageType::FLOAT_2D, "output_img")
56 .compute_source("compositor_keying_compute_image.glsl")
57 .do_static_compilation(true);
input_tx GPU_RGBA16F
#define GPU_SHADER_CREATE_INFO(_info)