Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_output_material.cc
| Show All 17 Lines | |||||
| */ | */ | ||||
| #include "node_shader_util.hh" | #include "node_shader_util.hh" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| /* **************** OUTPUT ******************** */ | /* **************** OUTPUT ******************** */ | ||||
| namespace blender::nodes::node_shader_output_material_cc { | |||||
| static bNodeSocketTemplate sh_node_output_material_in[] = { | static bNodeSocketTemplate sh_node_output_material_in[] = { | ||||
| {SOCK_SHADER, N_("Surface")}, | {SOCK_SHADER, N_("Surface")}, | ||||
| {SOCK_SHADER, N_("Volume")}, | {SOCK_SHADER, N_("Volume")}, | ||||
| {SOCK_VECTOR, | {SOCK_VECTOR, | ||||
| N_("Displacement"), | N_("Displacement"), | ||||
| 0.0f, | 0.0f, | ||||
| 0.0f, | 0.0f, | ||||
| 0.0f, | 0.0f, | ||||
| Show All 34 Lines | GPU_stack_link(mat, | ||||
| alpha_threshold_link, | alpha_threshold_link, | ||||
| shadow_threshold_link, | shadow_threshold_link, | ||||
| &outlink); | &outlink); | ||||
| GPU_material_output_link(mat, outlink); | GPU_material_output_link(mat, outlink); | ||||
| return true; | return true; | ||||
| } | } | ||||
| } // namespace blender::nodes::node_shader_output_material_cc | |||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_output_material() | void register_node_type_sh_output_material() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_shader_output_material_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_OUTPUT_MATERIAL, "Material Output", NODE_CLASS_OUTPUT, 0); | sh_node_type_base(&ntype, SH_NODE_OUTPUT_MATERIAL, "Material Output", NODE_CLASS_OUTPUT, 0); | ||||
| node_type_socket_templates(&ntype, sh_node_output_material_in, nullptr); | node_type_socket_templates(&ntype, file_ns::sh_node_output_material_in, nullptr); | ||||
| node_type_init(&ntype, nullptr); | node_type_init(&ntype, nullptr); | ||||
| node_type_storage(&ntype, "", nullptr, nullptr); | node_type_storage(&ntype, "", nullptr, nullptr); | ||||
| node_type_gpu(&ntype, node_shader_gpu_output_material); | node_type_gpu(&ntype, file_ns::node_shader_gpu_output_material); | ||||
| ntype.no_muting = true; | ntype.no_muting = true; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||