24 b.use_custom_socket_order();
25 b.allow_any_socket_order();
27 b.add_input<
decl::Color>(
"Image"_ustr).default_value({1.0f, 1.0f, 1.0f, 1.0f}).hide_value();
28 b.add_output<
decl::Color>(
"Image"_ustr).align_with_previous();
61 return GPU_stack_link(material,
node,
"node_composite_hue_saturation_value", inputs, outputs);
66 const float saturation,
74 hsv.y = hsv.y * saturation;
75 hsv.z = hsv.z * value;
88 static auto function = mf::build::SI5_SO<Color, float, float, float, float, Color>(
89 "Hue Saturation Value",
92 const float saturation,
94 const float factor) ->
Color {
97 mf::build::exec_presets::SomeSpanOrSingle<0>());
106 ntype.
ui_name =
"Hue/Saturation/Value";
107 ntype.
ui_description =
"Apply a color transformation in the HSV color model";
#define NODE_CLASS_OP_COLOR
#define BLT_I18NCONTEXT_COLOR
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void set_matching_fn(const mf::MultiFunction *fn)
void node_register_type(bNodeType &ntype)
ColorSceneLinear4f< eAlpha::Premultiplied > Color
T interpolate(const T &a, const T &b, const FactorT &t)
T max(const T &a, const T &b)
static void node_register()
static float4 hue_saturation_value(const float4 &color, const float hue, const float saturation, const float value, const float factor)
static void node_declare(NodeDeclarationBuilder &b)
static int node_gpu_material(GPUMaterial *material, bNode *node, bNodeExecData *, GPUNodeStack *inputs, GPUNodeStack *outputs)
static void node_build_multi_function(nodes::NodeMultiFunctionBuilder &builder)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
void rgb_to_hsv_v(const float rgb[3], float r_hsv[3])
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
void cmp_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
std::string ui_description
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
NodeDeclareFunction declare