Blender V4.3
node_composite_hue_sat_val.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2006 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include "GPU_material.hh"
10
11#include "COM_shader_node.hh"
12
14
15/* **************** Hue/Saturation/Value ******************** */
16
18
20{
21 b.add_input<decl::Color>("Image")
22 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
23 .compositor_domain_priority(0);
24 b.add_input<decl::Float>("Hue")
25 .default_value(0.5f)
26 .min(0.0f)
27 .max(1.0f)
29 .compositor_domain_priority(1);
30 b.add_input<decl::Float>("Saturation")
31 .default_value(1.0f)
32 .min(0.0f)
33 .max(2.0f)
35 .compositor_domain_priority(2);
36 b.add_input<decl::Float>("Value")
37 .default_value(1.0f)
38 .min(0.0f)
39 .max(2.0f)
41 .translation_context(BLT_I18NCONTEXT_COLOR)
42 .compositor_domain_priority(3);
43 b.add_input<decl::Float>("Fac")
44 .default_value(1.0f)
45 .min(0.0f)
46 .max(1.0f)
48 .compositor_domain_priority(4);
49 b.add_output<decl::Color>("Image");
50}
51
52using namespace blender::realtime_compositor;
53
55 public:
57
58 void compile(GPUMaterial *material) override
59 {
62
63 GPU_stack_link(material, &bnode(), "node_composite_hue_saturation_value", inputs, outputs);
64 }
65};
66
71
72} // namespace blender::nodes::node_composite_hue_sat_val_cc
73
75{
77
78 static blender::bke::bNodeType ntype;
79
80 cmp_node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue/Saturation/Value", NODE_CLASS_OP_COLOR);
81 ntype.declare = file_ns::cmp_node_huesatval_declare;
82 ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node;
83
85}
#define NODE_CLASS_OP_COLOR
Definition BKE_node.hh:406
#define BLT_I18NCONTEXT_COLOR
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
@ PROP_FACTOR
Definition RNA_types.hh:154
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
Definition node.cc:1708
static void cmp_node_huesatval_declare(NodeDeclarationBuilder &b)
void register_node_type_cmp_hue_sat()
void cmp_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
Defines a node type.
Definition BKE_node.hh:218
NodeDeclareFunction declare
Definition BKE_node.hh:347
NodeGetCompositorShaderNodeFunction get_compositor_shader_node
Definition BKE_node.hh:328