41 .compositor_domain_priority(2);
43 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
44 .compositor_domain_priority(0);
46 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
47 .compositor_domain_priority(1);
86 return "mix_exclusion";
136 const float min[4] = {0.0f, 0.0f, 0.0f, 0.0f};
137 const float max[4] = {1.0f, 1.0f, 1.0f, 1.0f};
153 return mf::build::SI3_SO<float, float4, float4, float4>(
154 "Mix RGB Alpha Clamp",
156 const float alpha_factor = factor * color2.w;
161 mf::build::exec_presets::SomeSpanOrSingle<1, 2>());
166 return mf::build::SI3_SO<float, float4, float4, float4>(
169 const float alpha_factor = factor * color2.w;
174 mf::build::exec_presets::SomeSpanOrSingle<1, 2>());
181 return mf::build::SI3_SO<float, float4, float4, float4>(
188 mf::build::exec_presets::SomeSpanOrSingle<1, 2>());
193 return mf::build::SI3_SO<float, float4, float4, float4>(
200 mf::build::exec_presets::SomeSpanOrSingle<1, 2>());
216 ntype.
ui_description =
"Blend two images together using various blending modes";
220 ntype.
declare = file_ns::cmp_node_mixrgb_declare;
222 ntype.
gpu_fn = file_ns::node_gpu_material;
General operations, lookup, etc. for materials.
void ramp_blend(int type, float r_col[3], float fac, const float col[3])
#define NODE_CLASS_OP_COLOR
#define BLI_assert_unreachable()
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_constant(const float *num)
bool GPU_link(GPUMaterial *mat, const char *name,...)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void construct_and_set_matching_fn_cb(Fn &&create_multi_function)
void node_register_type(bNodeType &ntype)
GPUNodeStack & get_shader_node_input(const bNode &node, GPUNodeStack inputs[], StringRef identifier)
GPUNodeStack & get_shader_node_output(const bNode &node, GPUNodeStack outputs[], StringRef identifier)
GPUNodeLink * get_shader_node_input_link(const bNode &node, GPUNodeStack inputs[], StringRef identifier)
T clamp(const T &a, const T &min, const T &max)
static int node_gpu_material(GPUMaterial *material, bNode *node, bNodeExecData *, GPUNodeStack *inputs, GPUNodeStack *outputs)
static int get_mode(const bNode &node)
static const char * get_shader_function_name(const bNode &node)
static void node_build_multi_function(blender::nodes::NodeMultiFunctionBuilder &builder)
static bool get_should_clamp(const bNode &node)
static void cmp_node_mixrgb_declare(NodeDeclarationBuilder &b)
static bool get_use_alpha(const bNode &node)
VecBase< float, 4 > float4
static void register_node_type_cmp_mix_rgb()
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[]
void node_blend_label(const bNodeTree *, const bNode *node, char *label, int label_maxncpy)
std::string ui_description
void(* labelfunc)(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy)
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare