14 b.add_input<
decl::Color>(
"Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
42 GPU_link(mat,
"world_normals_get", &in[2].link);
53 if (to_type_ != NodeItem::Type::BSDF) {
57 NodeItem color = get_input_value(
"Color", NodeItem::Type::Color3);
58 NodeItem roughness = get_input_value(
"Roughness", NodeItem::Type::Float);
59 NodeItem normal = get_input_link(
"Normal", NodeItem::Type::Vector3);
61 return create_node(
"sheen_bsdf",
63 {{
"color", color}, {
"roughness", roughness}, {
"normal", normal}});
79 ntype.
declare = file_ns::node_declare;
80 ntype.
initfunc = file_ns::node_shader_init_sheen;
81 ntype.
gpu_fn = file_ns::node_shader_gpu_bsdf_sheen;
#define NODE_CLASS_SHADER
#define SHD_SHEEN_MICROFIBER
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
bool GPU_link(GPUMaterial *mat, const char *name,...)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
static void node_declare(NodeDeclarationBuilder &b)
static void node_shader_buts_sheen(uiLayout *layout, bContext *, PointerRNA *ptr)
static int node_shader_gpu_bsdf_sheen(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_shader_init_sheen(bNodeTree *, bNode *node)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_bsdf_sheen()
void sh_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
bool object_cycles_shader_nodes_poll(const bContext *C)
NodeMaterialXFunction materialx_fn
bool(* add_ui_poll)(const bContext *C)
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGPUExecFunction gpu_fn
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare