27 bNode * ,
float *
out,
float hue,
float sat,
float val,
float *
in,
float fac)
29 if (fac != 0 && (hue != 0.5f || sat != 1 || val != 1)) {
30 float col[3], hsv[3], mfac = 1.0f - fac;
33 hsv[0] += (hue - 0.5f);
37 else if (hsv[0] < 0.0f) {
44 else if (hsv[1] < 0.0f) {
51 else if (hsv[2] < 0.0f) {
56 out[0] = mfac *
in[0] + fac *
col[0];
57 out[1] = mfac *
in[1] + fac *
col[1];
58 out[2] = mfac *
in[2] + fac *
col[2];
97 ntype.
ui_name =
"Hue/Saturation/Value";
#define NODE_CLASS_OP_COLOR
void rgb_to_hsv(float r, float g, float b, float *r_h, float *r_s, float *r_v)
void hsv_to_rgb(float h, float s, float v, float *r_r, float *r_g, float *r_b)
MINLINE void copy_v4_v4(float r[4], const float a[4])
BMesh const char void * data
void node_register_type(bNodeType &ntype)
void node_type_socket_templates(bNodeType *ntype, bNodeSocketTemplate *inputs, bNodeSocketTemplate *outputs)
void node_type_size_preset(bNodeType &ntype, eNodeSizePreset size)
static blender::bke::bNodeSocketTemplate outputs[]
static void colorfn(float *out, TexParams *p, bNode *, bNodeStack **in, short thread)
static void exec(void *data, int, bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
static blender::bke::bNodeSocketTemplate inputs[]
static void exec(void *data, int, bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
static void do_hue_sat_fac(bNode *, float *out, float hue, float sat, float val, float *in, float fac)
static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
void register_node_type_tex_hue_sat()
void tex_output(bNode *node, bNodeExecData *, bNodeStack **in, bNodeStack *out, TexFn texfn, TexCallData *cdata)
float tex_input_value(bNodeStack *in, TexParams *params, short thread)
void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread)
void tex_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
Compact definition of a node socket.
const char * enum_name_legacy