11 b.add_input<
decl::Color>(
"Color").default_value({0.8f, 0.8f, 0.8f, 1.0f});
24 GPU_link(mat,
"world_normals_get", &
in[1].link);
35 if (to_type_ != NodeItem::Type::BSDF) {
39 NodeItem
color = get_input_value(
"Color", NodeItem::Type::Color3);
40 NodeItem normal = get_input_link(
"Normal", NodeItem::Type::Vector3);
43 "translucent_bsdf", NodeItem::Type::BSDF, {{
"color",
color}, {
"normal", normal}});
58 ntype.
ui_name =
"Translucent BSDF";
62 ntype.
declare = file_ns::node_declare;
64 ntype.
gpu_fn = file_ns::node_shader_gpu_bsdf_translucent;
#define NODE_CLASS_SHADER
#define SH_NODE_BSDF_TRANSLUCENT
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
@ GPU_MATFLAG_TRANSLUCENT
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
bool GPU_link(GPUMaterial *mat, const char *name,...)
void node_register_type(bNodeType &ntype)
static int node_shader_gpu_bsdf_translucent(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_translucent()
void sh_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
bool object_shader_nodes_poll(const bContext *C)
NodeMaterialXFunction materialx_fn
std::string ui_description
bool(* add_ui_poll)(const bContext *C)
NodeGPUExecFunction gpu_fn
const char * enum_name_legacy
NodeDeclareFunction declare