11 b.add_input<
decl::Color>(
"Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
29 GPU_link(mat,
"world_normals_get", &in[2].link);
40 if (to_type_ != NodeItem::Type::BSDF) {
44 NodeItem color = get_input_value(
"Color", NodeItem::Type::Color3);
45 NodeItem roughness = get_input_value(
"Roughness", NodeItem::Type::Float);
46 NodeItem normal = get_input_link(
"Normal", NodeItem::Type::Vector3);
48 return create_node(
"oren_nayar_diffuse_bsdf",
50 {{
"color", color}, {
"roughness", roughness}, {
"normal", normal}});
65 ntype.
declare = file_ns::node_declare;
68 ntype.
gpu_fn = file_ns::node_shader_gpu_bsdf_diffuse;
#define NODE_CLASS_SHADER
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,...)
local_group_size(16, 16) .push_constant(Type b
void node_type_size_preset(bNodeType *ntype, eNodeSizePreset size)
void node_register_type(bNodeType *ntype)
static int node_shader_gpu_bsdf_diffuse(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_bsdf_diffuse()
void sh_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
bool object_shader_nodes_poll(const bContext *C)
NodeMaterialXFunction materialx_fn
bool(* add_ui_poll)(const bContext *C)
NodeGPUExecFunction gpu_fn
NodeDeclareFunction declare