29 .default_value({0.0f, 0.0f, 1.0f})
33 .compositor_domain_priority(0);
35 .default_value({0.0f, 0.0f, 1.0f})
47 const bNodeSocket &normal_output = node.output_by_identifier(
"Normal");
60 "node_composite_normal",
71 return mf::build::SI1_SO2<float3, float3, float>(
74 output_normal = normalized_node_normal;
77 mf::build::exec_presets::AllSpanOrSingle());
91 ntype.
ui_description =
"Generate a normal vector and a dot product";
94 ntype.
declare = file_ns::cmp_node_normal_declare;
95 ntype.
gpu_fn = file_ns::node_gpu_material;
#define NODE_CLASS_OP_VECTOR
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_uniform(const float *num)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void construct_and_set_matching_fn_cb(Fn &&create_multi_function)
dot(value.rgb, luminance_coefficients)") DEFINE_VALUE("REDUCE(lhs
void node_register_type(bNodeType &ntype)
T dot(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
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 void cmp_node_normal_declare(NodeDeclarationBuilder &b)
static float3 get_vector_value(const bNode &node)
VecBase< float, 3 > float3
static void register_node_type_cmp_normal()
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
NodeDeclareFunction declare