29 GPUNodeLink *outlink_surface, *outlink_volume, *outlink_displacement, *outlink_thickness;
32 GPU_link(mat,
"node_output_material_surface",
in[0].link, &outlink_surface);
36 GPU_link(mat,
"node_output_material_volume",
in[1].link, &outlink_volume);
40 GPU_link(mat,
"node_output_material_displacement",
in[2].link, &outlink_displacement);
45 "node_output_material_thickness",
58 NodeItem surface = get_input_link(
"Surface", NodeItem::Type::SurfaceShader);
60 NodeItem bsdf = get_input_link(
"Surface", NodeItem::Type::BSDF);
61 NodeItem edf = get_input_link(
"Surface", NodeItem::Type::EDF);
63 NodeItem opacity = get_input_link(
"Surface", NodeItem::Type::SurfaceOpacity);
64 surface = create_node(
"surface",
65 NodeItem::Type::SurfaceShader,
66 {{
"bsdf", bsdf}, {
"edf", edf}, {
"opacity", opacity}});
78 return create_node(
"surfacematerial", NodeItem::Type::Material, {{
"surfaceshader", surface}});
93 ntype.
ui_name =
"Material Output";
94 ntype.
ui_description =
"Output surface material information for use in rendering";
97 ntype.
declare = file_ns::node_declare;
99 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 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 *)
bool object_shader_nodes_poll(const bContext *C)
void GPU_material_output_surface(GPUMaterial *material, GPUNodeLink *link)
void sh_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
bool GPU_link(GPUMaterial *mat, const char *name,...)
void GPU_material_output_displacement(GPUMaterial *material, GPUNodeLink *link)
void register_node_type_sh_output_material()
void GPU_material_output_volume(GPUMaterial *material, GPUNodeLink *link)
GPUNodeLink * GPU_shading_data()
GPUNodeLink * GPU_kernel_globals()
void GPU_material_output_thickness(GPUMaterial *material, GPUNodeLink *link)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
NodeMaterialXFunction materialx_fn
std::string ui_description
NodeGPUExecFunction gpu_fn
const char * enum_name_legacy
NodeDeclareFunction declare
bool(*) add_ui_poll(const bContext *C)