23 GPUNodeLink *outlink_surface, *outlink_volume, *outlink_displacement, *outlink_thickness;
26 GPU_link(mat,
"node_output_material_surface", in[0].link, &outlink_surface);
30 GPU_link(mat,
"node_output_material_volume", in[1].link, &outlink_volume);
34 GPU_link(mat,
"node_output_material_displacement", in[2].link, &outlink_displacement);
38 GPU_link(mat,
"node_output_material_thickness", in[3].link, &outlink_thickness);
47 NodeItem surface = get_input_link(
"Surface", NodeItem::Type::SurfaceShader);
49 NodeItem bsdf = get_input_link(
"Surface", NodeItem::Type::BSDF);
50 NodeItem edf = get_input_link(
"Surface", NodeItem::Type::EDF);
52 NodeItem opacity = get_input_link(
"Surface", NodeItem::Type::SurfaceOpacity);
53 surface = create_node(
"surface",
54 NodeItem::Type::SurfaceShader,
55 {{
"bsdf", bsdf}, {
"edf", edf}, {
"opacity", opacity}});
58 return create_node(
"surfacematerial", NodeItem::Type::Material, {{
"surfaceshader", surface}});
73 ntype.
declare = file_ns::node_declare;
75 ntype.
gpu_fn = file_ns::node_shader_gpu_output_material;
#define NODE_CLASS_OUTPUT
#define SH_NODE_OUTPUT_MATERIAL
#define BLT_I18NCONTEXT_ID_ID
void GPU_material_output_surface(GPUMaterial *material, GPUNodeLink *link)
void GPU_material_output_displacement(GPUMaterial *material, GPUNodeLink *link)
void GPU_material_output_thickness(GPUMaterial *material, GPUNodeLink *link)
void GPU_material_output_volume(GPUMaterial *material, GPUNodeLink *link)
bool GPU_link(GPUMaterial *mat, const char *name,...)
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
static void node_declare(NodeDeclarationBuilder &b)
static int node_shader_gpu_output_material(GPUMaterial *mat, bNode *, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_output_material()
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