29 .default_value({1.0f, 1.0f, 1.0f, 1.0f})
30 .compositor_domain_priority(0);
64 static auto premultiply_function = mf::build::SI1_SO<float4, float4>(
65 "Alpha Convert Premultiply",
67 mf::build::exec_presets::AllSpanOrSingle());
69 static auto unpremultiply_function = mf::build::SI1_SO<float4, float4>(
70 "Alpha Convert Unpremultiply",
77 mf::build::exec_presets::AllSpanOrSingle());
98 ntype.
ui_name =
"Alpha Convert";
99 ntype.
ui_description =
"Convert to and from premultiplied (associated) alpha";
102 ntype.
declare = file_ns::cmp_node_premulkey_declare;
103 ntype.
draw_buttons = file_ns::node_composit_buts_premulkey;
104 ntype.
gpu_fn = file_ns::node_gpu_material;
#define NODE_CLASS_CONVERTER
#define CMP_NODE_PREMULKEY
@ CMP_NODE_ALPHA_CONVERT_UNPREMULTIPLY
@ CMP_NODE_ALPHA_CONVERT_PREMULTIPLY
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
void set_matching_fn(const mf::MultiFunction *fn)
void node_register_type(bNodeType &ntype)
static void cmp_node_premulkey_declare(NodeDeclarationBuilder &b)
static void node_composit_buts_premulkey(uiLayout *layout, bContext *, PointerRNA *ptr)
static int node_gpu_material(GPUMaterial *material, bNode *node, bNodeExecData *, GPUNodeStack *inputs, GPUNodeStack *outputs)
static void node_build_multi_function(blender::nodes::NodeMultiFunctionBuilder &builder)
static CMPNodeAlphaConvertMode get_mode(const bNode &node)
VecBase< float, 4 > float4
static void register_node_type_cmp_premulkey()
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[]
std::string ui_description
NodeGPUExecFunction gpu_fn
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)