23 b.add_input<
decl::Color>(
"Color"_ustr).default_value({0.8f, 0.8f, 0.8f, 1.0f});
30 b.add_input<
decl::Float>(
"Weight"_ustr).available(is_gpu_internal);
63 if (to_type_ != NodeItem::Type::BSDF) {
67 NodeItem
color = get_input_value(
"Color", NodeItem::Type::Color3);
68 NodeItem roughness = get_input_value(
"Roughness", NodeItem::Type::Float);
69 NodeItem normal = get_input_link(
"Normal", NodeItem::Type::Vector3);
70# if !(MATERIALX_MAJOR_VERSION <= 1 && MATERIALX_MINOR_VERSION <= 38)
72 val(std::string(
"conty_kulla"));
75 return create_node(
"sheen_bsdf",
78 {
"roughness", roughness},
80# if !(MATERIALX_MAJOR_VERSION <= 1 && MATERIALX_MINOR_VERSION <= 38)
102 "Reflection for materials such as cloth.\nTypically mixed with other shaders (such as a "
103 "Diffuse Shader) and is not particularly useful on its own";
107 ntype.
declare = file_ns::node_declare;
109 ntype.
initfunc = file_ns::node_shader_init_sheen;
110 ntype.
gpu_fn = file_ns::node_shader_gpu_bsdf_sheen;
#define NODE_CLASS_SHADER
#define SH_NODE_BSDF_SHEEN
#define SHD_SHEEN_MICROFIBER
void node_register_type(bNodeType &ntype)
static void node_declare(NodeDeclarationBuilder &b)
static int node_shader_gpu_bsdf_sheen(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_shader_buts_sheen(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_shader_init_sheen(bNodeTree *, bNode *node)
@ ITEM_R_SPLIT_EMPTY_NAME
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
bool object_cycles_shader_nodes_poll(const bContext *C)
void sh_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
void register_node_type_sh_bsdf_sheen()
bool GPU_link(GPUMaterial *mat, const char *name,...)
void search_link_ops_for_shader_bsdf_node(nodes::GatherLinkSearchOpParams ¶ms)
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
GPUNodeLink * GPU_shading_data()
@ NTREE_IS_GPU_SHADER_INTERNAL
GPUNodeLink * GPU_kernel_globals()
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
NodeMaterialXFunction materialx_fn
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
NodeGPUExecFunction gpu_fn
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
bool(*) add_ui_poll(const bContext *C)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)