30 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
31 .description(
"Image/Color input on which RGB color transformation will be applied");
37 .description(
"Amount of influence the node exerts on the image");
39 .default_value({0.0f, 0.0f, 0.0f, 1.0f})
40 .description(
"Input color that should be mapped to black");
42 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
43 .description(
"Input color that should be mapped to white");
75 float start_slopes[
CM_TOT];
78 float range_minimums[
CM_TOT];
80 float range_dividers[
CM_TOT];
86 "curves_film_like_compositor",
97 const float min = 0.0f;
98 const float max = 1.0f;
113 "curves_combined_only_compositor",
126 "curves_combined_rgb_compositor",
160 return mf::build::SI4_SO<Color, float, Color, Color, Color>(
168 curves_rgba(curve_mapping, float4(color), factor, float4(black), float4(white)));
170 mf::build::exec_presets::SomeSpanOrSingle<0>());
180 ntype.
ui_description =
"Perform level adjustments on each color channel of an image";
#define NODE_CLASS_OP_COLOR
#define CMP_NODE_CURVE_RGB
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void construct_and_set_matching_fn_cb(Fn &&create_multi_function)
const std::shared_ptr< const bNodeTree > & shared_tree()
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
T clamp(const T &a, const T &min, const T &max)
T interpolate(const T &a, const T &b, const FactorT &t)
static CurveMapping * get_curve_mapping(const bNode &node)
static void node_declare(NodeDeclarationBuilder &b)
static void node_init(bNodeTree *, bNode *node)
static float4 curves_rgba(const CurveMapping *curve_mapping, const float4 &color, const float factor, const float4 &black, const float4 &white)
static void node_build_multi_function(nodes::NodeMultiFunctionBuilder &builder)
static int node_gpu_material(GPUMaterial *material, bNode *node, bNodeExecData *, GPUNodeStack *inputs, GPUNodeStack *outputs)
static void node_register()
CurveMapping * BKE_curvemapping_add(int tot, float minx, float miny, float maxx, float maxy)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_node_get_input_link(const bNode &node, GPUNodeStack inputs[], StringRef identifier)
GPUNodeStack & GPU_node_get_input(const bNode &node, GPUNodeStack inputs[], StringRef identifier)
void BKE_curvemapping_premultiply(CurveMapping *cumap, bool restore)
GPUNodeLink * GPU_color_band(GPUMaterial *mat, int size, float *pixels, float *r_row)
GPUNodeLink * GPU_uniform(const float *num)
void BKE_curvemapping_init(CurveMapping *cumap)
GPUNodeLink * GPU_constant(const float *num)
bool GPU_link(GPUMaterial *mat, const char *name,...)
void node_free_curves(bNode *node)
void node_copy_curves(bNodeTree *, bNode *dest_node, const bNode *src_node)
void BKE_curvemapping_set_black_white_ex(const float black[3], const float white[3], float r_bwmul[3])
void BKE_curvemapping_table_RGBA(const CurveMapping *cumap, float **array, int *size)
void BKE_curvemapping_compute_slopes(const CurveMapping *curve_mapping, float start_slopes[4], float end_slopes[4])
void BKE_curvemapping_compute_range_dividers(const CurveMapping *curve_mapping, float dividers[4])
bool BKE_curvemapping_is_map_identity(const CurveMapping *curve_mapping, int index)
void BKE_curvemapping_get_range_minimums(const CurveMapping *curve_mapping, float minimums[4])
void BKE_curvemapping_evaluate_premulRGBF_ex(const CurveMapping *cumap, float vecout[3], const float vecin[3], const float black[3], const float bwmul[3])
void cmp_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
static constexpr int _200
std::string ui_description
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
NodeDeclareFunction declare