28 b.use_custom_socket_order();
29 b.allow_any_socket_order();
31 b.add_input<
decl::Color>(
"Image").default_value({1.0f, 1.0f, 1.0f, 1.0f}).hide_value();
32 b.add_output<
decl::Color>(
"Image").align_with_previous();
66 static auto function = mf::build::SI5_SO<float4, float, float, float, float, float4>(
67 "Hue Saturation Value",
70 const float saturation,
72 const float factor) ->
float4 {
77 hsv.y = hsv.y * saturation;
78 hsv.z = hsv.z * value;
86 mf::build::exec_presets::SomeSpanOrSingle<0>());
99 ntype.
ui_name =
"Hue/Saturation/Value";
100 ntype.
ui_description =
"Apply a color transformation in the HSV color model";
103 ntype.
declare = file_ns::cmp_node_huesatval_declare;
104 ntype.
gpu_fn = file_ns::node_gpu_material;
#define NODE_CLASS_OP_COLOR
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
void rgb_to_hsv_v(const float rgb[3], float r_hsv[3])
#define BLT_I18NCONTEXT_COLOR
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void set_matching_fn(const mf::MultiFunction *fn)
void node_register_type(bNodeType &ntype)
T interpolate(const T &a, const T &b, const FactorT &t)
T max(const T &a, const T &b)
static int node_gpu_material(GPUMaterial *material, bNode *node, bNodeExecData *, GPUNodeStack *inputs, GPUNodeStack *outputs)
static void cmp_node_huesatval_declare(NodeDeclarationBuilder &b)
static void node_build_multi_function(blender::nodes::NodeMultiFunctionBuilder &builder)
VecBase< float, 4 > float4
VecBase< float, 3 > float3
static void register_node_type_cmp_hue_sat()
void cmp_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
static blender::bke::bNodeSocketTemplate outputs[]
static blender::bke::bNodeSocketTemplate inputs[]
std::string ui_description
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
NodeDeclareFunction declare