Blender V5.3
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
5#ifdef GPU_SHADER
6# pragma once
7# include "gpu_shader_compat.hh"
8#endif
9
11
12GPU_SHADER_CREATE_INFO(compositor_keying_extract_chroma)
13LOCAL_GROUP_SIZE(16, 16)
14SAMPLER(0, sampler2D, input_tx)
15IMAGE(0, SFLOAT_16_16_16_16, write, image2D, output_img)
16COMPUTE_SOURCE("compositor_keying_extract_chroma.glsl")
19
20GPU_SHADER_CREATE_INFO(compositor_keying_replace_chroma)
21LOCAL_GROUP_SIZE(16, 16)
22SAMPLER(0, sampler2D, input_tx)
23SAMPLER(1, sampler2D, new_chroma_tx)
24IMAGE(0, SFLOAT_16_16_16_16, write, image2D, output_img)
25COMPUTE_SOURCE("compositor_keying_replace_chroma.glsl")
28
29GPU_SHADER_CREATE_INFO(compositor_keying_compute_matte)
30LOCAL_GROUP_SIZE(16, 16)
31PUSH_CONSTANT(float, key_balance)
32SAMPLER(0, sampler2D, input_tx)
33SAMPLER(1, sampler2D, key_tx)
34IMAGE(0, SFLOAT_16, write, image2D, output_img)
35COMPUTE_SOURCE("compositor_keying_compute_matte.glsl")
38
39GPU_SHADER_CREATE_INFO(compositor_keying_tweak_matte_shared)
40LOCAL_GROUP_SIZE(16, 16)
41PUSH_CONSTANT(int, edge_search_radius)
42PUSH_CONSTANT(float, edge_tolerance)
43PUSH_CONSTANT(float, black_level)
44PUSH_CONSTANT(float, white_level)
45SAMPLER(0, sampler2D, input_matte_tx)
46SAMPLER(1, sampler2D, garbage_matte_tx)
47SAMPLER(2, sampler2D, core_matte_tx)
48IMAGE(0, SFLOAT_16, write, image2D, output_matte_img)
49COMPUTE_SOURCE("compositor_keying_tweak_matte.glsl")
51
52GPU_SHADER_CREATE_INFO(compositor_keying_tweak_matte_without_edges)
53ADDITIONAL_INFO(compositor_keying_tweak_matte_shared)
56
57GPU_SHADER_CREATE_INFO(compositor_keying_tweak_matte_with_edges)
58ADDITIONAL_INFO(compositor_keying_tweak_matte_shared)
59DEFINE("COMPUTE_EDGES")
60IMAGE(1, SFLOAT_16, write, image2D, output_edges_img)
63
64GPU_SHADER_CREATE_INFO(compositor_keying_compute_image)
65LOCAL_GROUP_SIZE(16, 16)
66PUSH_CONSTANT(float, despill_factor)
67PUSH_CONSTANT(float, despill_balance)
68SAMPLER(0, sampler2D, input_tx)
69SAMPLER(1, sampler2D, matte_tx)
70SAMPLER(2, sampler2D, key_tx)
71IMAGE(0, SFLOAT_16_16_16_16, write, image2D, output_img)
72COMPUTE_SOURCE("compositor_keying_compute_image.glsl")
@ SFLOAT_16_16_16_16
#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