Blender V5.0
compositor_keying_infos.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)
9SAMPLER(0, sampler2D, input_tx)
10IMAGE(0, SFLOAT_16_16_16_16, write, image2D, output_img)
11COMPUTE_SOURCE("compositor_keying_extract_chroma.glsl")
14
15GPU_SHADER_CREATE_INFO(compositor_keying_replace_chroma)
16LOCAL_GROUP_SIZE(16, 16)
17SAMPLER(0, sampler2D, input_tx)
18SAMPLER(1, sampler2D, new_chroma_tx)
19IMAGE(0, SFLOAT_16_16_16_16, write, image2D, output_img)
20COMPUTE_SOURCE("compositor_keying_replace_chroma.glsl")
23
24GPU_SHADER_CREATE_INFO(compositor_keying_compute_matte)
25LOCAL_GROUP_SIZE(16, 16)
26PUSH_CONSTANT(float, key_balance)
27SAMPLER(0, sampler2D, input_tx)
28SAMPLER(1, sampler2D, key_tx)
29IMAGE(0, SFLOAT_16, write, image2D, output_img)
30COMPUTE_SOURCE("compositor_keying_compute_matte.glsl")
33
34GPU_SHADER_CREATE_INFO(compositor_keying_tweak_matte_shared)
35LOCAL_GROUP_SIZE(16, 16)
36PUSH_CONSTANT(int, edge_search_radius)
37PUSH_CONSTANT(float, edge_tolerance)
38PUSH_CONSTANT(float, black_level)
39PUSH_CONSTANT(float, white_level)
40SAMPLER(0, sampler2D, input_matte_tx)
41SAMPLER(1, sampler2D, garbage_matte_tx)
42SAMPLER(2, sampler2D, core_matte_tx)
43IMAGE(0, SFLOAT_16, write, image2D, output_matte_img)
44COMPUTE_SOURCE("compositor_keying_tweak_matte.glsl")
46
47GPU_SHADER_CREATE_INFO(compositor_keying_tweak_matte_without_edges)
48ADDITIONAL_INFO(compositor_keying_tweak_matte_shared)
51
52GPU_SHADER_CREATE_INFO(compositor_keying_tweak_matte_with_edges)
53ADDITIONAL_INFO(compositor_keying_tweak_matte_shared)
54DEFINE("COMPUTE_EDGES")
55IMAGE(1, SFLOAT_16, write, image2D, output_edges_img)
58
59GPU_SHADER_CREATE_INFO(compositor_keying_compute_image)
60LOCAL_GROUP_SIZE(16, 16)
61PUSH_CONSTANT(float, despill_factor)
62PUSH_CONSTANT(float, despill_balance)
63SAMPLER(0, sampler2D, input_tx)
64SAMPLER(1, sampler2D, matte_tx)
65SAMPLER(2, sampler2D, key_tx)
66IMAGE(0, SFLOAT_16_16_16_16, write, image2D, output_img)
67COMPUTE_SOURCE("compositor_keying_compute_image.glsl")
#define GPU_SHADER_CREATE_INFO(_info)
#define GPU_SHADER_CREATE_END()
#define SAMPLER(slot, type, name)
#define ADDITIONAL_INFO(info_name)
#define PUSH_CONSTANT(type, name)
#define DEFINE(name)
#define LOCAL_GROUP_SIZE(...)
#define IMAGE(slot, format, qualifiers, type, name)
#define COMPUTE_SOURCE(filename)
#define DO_STATIC_COMPILATION()
ImageBase< float, 2 > image2D
SamplerBase< float, 2 > sampler2D