49 result.allocate_single_value();
54 result.set_float_value(
clamp_f(time, 0.0f, 1.0f));
102 ntype.
declare = file_ns::cmp_node_time_declare;
104 ntype.
initfunc = file_ns::node_composit_init_curves_time;
118 .default_value({0.0f, 0.0f, 0.0f})
155 float start_slopes[
CM_TOT];
158 float range_minimums[
CM_TOT];
160 float range_dividers[
CM_TOT];
196 ntype.
declare = file_ns::cmp_node_curve_vec_declare;
199 ntype.
initfunc = file_ns::node_composit_init_curve_vec;
217 .compositor_domain_priority(1)
218 .description(
"Amount of influence the node exerts on the image");
220 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
221 .compositor_domain_priority(0)
222 .
description(
"Image/Color input on which RGB color transformation will be applied");
224 .default_value({0.0f, 0.0f, 0.0f, 1.0f})
225 .description(
"Input color that should be mapped to black");
227 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
228 .description(
"Input color that should be mapped to white");
257 float start_slopes[
CM_TOT];
260 float range_minimums[
CM_TOT];
262 float range_dividers[
CM_TOT];
280 const float min = 0.0f;
281 const float max = 1.0f;
296 "curves_combined_only",
310 "curves_combined_rgb",
341 ntype.
declare = file_ns::cmp_node_rgbcurves_declare;
343 ntype.
initfunc = file_ns::node_composit_init_curve_rgb;
#define NODE_CLASS_OP_VECTOR
#define NODE_CLASS_OP_COLOR
MINLINE float clamp_f(float value, float min, float max)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_constant(const float *num)
GPUNodeLink * GPU_color_band(GPUMaterial *mat, int size, float *pixels, float *r_row)
bool GPU_link(GPUMaterial *mat, const char *name,...)
GPUNodeLink * GPU_uniform(const float *num)
void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
int compositor_domain_priority() const
void compile(GPUMaterial *material) override
const CurveMapping * get_curve_mapping()
const CurveMapping * get_curve_mapping()
float compute_normalized_time()
const CurveMapping * get_curve_mapping()
void compile(GPUMaterial *material) override
int get_frame_number() const
NodeOperation(Context &context, DNode node)
const bNode & bnode() const
Result & get_result(StringRef identifier)
Context & context() const
GPUNodeStack * get_inputs_array()
GPUNodeStack * get_outputs_array()
GPUNodeLink * get_input_link(StringRef identifier)
GPUNodeStack & get_input(StringRef identifier)
const bNode & bnode() const
local_group_size(16, 16) .push_constant(Type b
draw_view in_light_buf[] float
void node_type_size(bNodeType *ntype, int width, int minwidth, int maxwidth)
void node_type_storage(bNodeType *ntype, const char *storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void node_register_type(bNodeType *ntype)
static ShaderNode * get_compositor_shader_node(DNode node)
static void cmp_node_rgbcurves_declare(NodeDeclarationBuilder &b)
static void node_composit_init_curve_rgb(bNodeTree *, bNode *node)
static NodeOperation * get_compositor_operation(Context &context, DNode node)
static void cmp_node_time_declare(NodeDeclarationBuilder &b)
static void node_composit_init_curves_time(bNodeTree *, bNode *node)
static ShaderNode * get_compositor_shader_node(DNode node)
static void node_buts_curvevec(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_composit_init_curve_vec(bNodeTree *, bNode *node)
static void cmp_node_curve_vec_declare(NodeDeclarationBuilder &b)
void register_node_type_cmp_curve_rgb()
void register_node_type_cmp_curve_time()
void register_node_type_cmp_curve_vec()
void cmp_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
void node_copy_curves(bNodeTree *, bNode *dest_node, const bNode *src_node)
void node_free_curves(bNode *node)
NodeGetCompositorOperationFunction get_compositor_operation
void(* initfunc)(bNodeTree *ntree, bNode *node)
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
NodeGetCompositorShaderNodeFunction get_compositor_shader_node