38 switch (node_storage(
node).mode) {
56 switch (node_storage(
node).mode) {
62 return IFACE_(
"Saturation");
75 switch (node_storage(
node).mode) {
82 return IFACE_(
"Lightness");
105 switch (node_storage(*node).mode) {
107 return GPU_stack_link(material,
node,
"node_composite_combine_rgba", inputs, outputs);
109 return GPU_stack_link(material,
node,
"node_composite_combine_hsva", inputs, outputs);
111 return GPU_stack_link(material,
node,
"node_composite_combine_hsla", inputs, outputs);
114 material,
node,
"node_composite_combine_yuva_itu_709", inputs, outputs);
116 switch (node_storage(*node).ycc_mode) {
119 material,
node,
"node_composite_combine_ycca_itu_601", inputs, outputs);
122 material,
node,
"node_composite_combine_ycca_itu_709", inputs, outputs);
125 material,
node,
"node_composite_combine_ycca_jpeg", inputs, outputs);
136 static auto rgba_function = mf::build::SI4_SO<float, float, float, float, Color>(
137 "Combine Color RGBA",
138 [](
const float r,
const float g,
const float b,
const float a) ->
Color {
141 mf::build::exec_presets::Materialized());
143 static auto hsva_function = mf::build::SI4_SO<float, float, float, float, Color>(
144 "Combine Color HSVA",
145 [](
const float h,
const float s,
const float v,
const float a) ->
Color {
151 mf::build::exec_presets::Materialized());
153 static auto hsla_function = mf::build::SI4_SO<float, float, float, float, Color>(
154 "Combine Color HSLA",
155 [](
const float h,
const float s,
const float l,
const float a) ->
Color {
161 mf::build::exec_presets::Materialized());
163 static auto yuva_function = mf::build::SI4_SO<float, float, float, float, Color>(
164 "Combine Color YUVA",
165 [](
const float y,
const float u,
const float v,
const float a) ->
Color {
171 mf::build::exec_presets::Materialized());
173 static auto ycca_itu_601_function = mf::build::SI4_SO<float, float, float, float, Color>(
174 "Combine Color YCCA ITU 601",
175 [](
const float y,
const float cb,
const float cr,
const float a) ->
Color {
187 mf::build::exec_presets::Materialized());
189 static auto ycca_itu_709_function = mf::build::SI4_SO<float, float, float, float, Color>(
190 "Combine Color YCCA ITU 709",
191 [](
const float y,
const float cb,
const float cr,
const float a) ->
Color {
203 mf::build::exec_presets::Materialized());
205 static auto ycca_jpeg_function = mf::build::SI4_SO<float, float, float, float, Color>(
206 "Combine Color YCCA JPEG",
207 [](
const float y,
const float cb,
const float cr,
const float a) ->
Color {
219 mf::build::exec_presets::Materialized());
221 switch (node_storage(builder.
node()).mode) {
235 switch (node_storage(builder.
node()).ycc_mode) {
254 ntype.
ui_name =
"Combine Color";
255 ntype.
ui_description =
"Combine an image from its composite color channels";
#define NODE_CLASS_CONVERTER
#define NODE_STORAGE_FUNCS(StorageT)
#define CMP_NODE_COMBINE_COLOR
#define BLI_YUV_ITU_BT709
#define BLI_YCC_JFIF_0_255
#define BLI_YCC_ITU_BT601
#define BLI_YCC_ITU_BT709
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_COLOR
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void set_matching_fn(const mf::MultiFunction *fn)
void node_register_type(bNodeType &ntype)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
ColorSceneLinear4f< eAlpha::Premultiplied > Color
static void node_register()
static void node_build_multi_function(nodes::NodeMultiFunctionBuilder &builder)
static void node_declare(NodeDeclarationBuilder &b)
static int node_gpu_material(GPUMaterial *material, bNode *node, bNodeExecData *, GPUNodeStack *inputs, GPUNodeStack *outputs)
static void node_init(bNodeTree *, bNode *node)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
void hsv_to_rgb(float h, float s, float v, float *r_r, float *r_g, float *r_b)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
void ycc_to_rgb(float y, float cb, float cr, float *r_r, float *r_g, float *r_b, int colorspace)
@ CMP_NODE_COMBSEP_COLOR_HSL
@ CMP_NODE_COMBSEP_COLOR_YCC
@ CMP_NODE_COMBSEP_COLOR_YUV
@ CMP_NODE_COMBSEP_COLOR_HSV
@ CMP_NODE_COMBSEP_COLOR_RGB
ATTR_WARN_UNUSED_RESULT const BMVert * v
BMesh const char void * data
void hsl_to_rgb(float h, float s, float l, float *r_r, float *r_g, float *r_b)
void yuv_to_rgb(float y, float u, float v, float *r_r, float *r_g, float *r_b, int colorspace)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
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
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
NodeDeclareFunction declare