Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_holdout.cc
| Show All 15 Lines | |||||
| * The Original Code is Copyright (C) 2005 Blender Foundation. | * The Original Code is Copyright (C) 2005 Blender Foundation. | ||||
| * All rights reserved. | * All rights reserved. | ||||
| */ | */ | ||||
| #include "node_shader_util.hh" | #include "node_shader_util.hh" | ||||
| /* **************** OUTPUT ******************** */ | /* **************** OUTPUT ******************** */ | ||||
| namespace blender::nodes::node_shader_holdout_cc { | |||||
| static bNodeSocketTemplate sh_node_holdout_in[] = { | static bNodeSocketTemplate sh_node_holdout_in[] = { | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| static bNodeSocketTemplate sh_node_holdout_out[] = { | static bNodeSocketTemplate sh_node_holdout_out[] = { | ||||
| {SOCK_SHADER, N_("Holdout")}, | {SOCK_SHADER, N_("Holdout")}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| static int gpu_shader_rgb(GPUMaterial *mat, | static int gpu_shader_rgb(GPUMaterial *mat, | ||||
| bNode *node, | bNode *node, | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| GPUNodeStack *in, | GPUNodeStack *in, | ||||
| GPUNodeStack *out) | GPUNodeStack *out) | ||||
| { | { | ||||
| return GPU_stack_link(mat, node, "node_holdout", in, out); | return GPU_stack_link(mat, node, "node_holdout", in, out); | ||||
| } | } | ||||
| } // namespace blender::nodes::node_shader_holdout_cc | |||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_holdout(void) | void register_node_type_sh_holdout(void) | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_shader_holdout_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_HOLDOUT, "Holdout", NODE_CLASS_SHADER, 0); | sh_node_type_base(&ntype, SH_NODE_HOLDOUT, "Holdout", NODE_CLASS_SHADER, 0); | ||||
| node_type_socket_templates(&ntype, sh_node_holdout_in, sh_node_holdout_out); | node_type_socket_templates(&ntype, file_ns::sh_node_holdout_in, file_ns::sh_node_holdout_out); | ||||
| 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, gpu_shader_rgb); | node_type_gpu(&ntype, file_ns::gpu_shader_rgb); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||