11 b.add_input<
decl::Float>(
"Blend").default_value(0.5f).min(0.0f).max(1.0f);
24 GPU_link(mat,
"world_normals_get", &
in[1].link);
35 return get_input_link(
"Blend", NodeItem::Type::Float);
52 "Produce a blending factor depending on the angle between the surface normal and the view "
53 "direction.\nTypically used for layering shaders with the Mix Shader node";
56 ntype.
declare = file_ns::node_declare;
57 ntype.
gpu_fn = file_ns::node_shader_gpu_layer_weight;
#define SH_NODE_LAYER_WEIGHT
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
bool GPU_link(GPUMaterial *mat, const char *name,...)
void node_register_type(bNodeType &ntype)
static int node_shader_gpu_layer_weight(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_layer_weight()
void sh_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
NodeMaterialXFunction materialx_fn
std::string ui_description
NodeGPUExecFunction gpu_fn
const char * enum_name_legacy
NodeDeclareFunction declare