Blender V4.3
node_shader_holdout.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2005 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#include "node_shader_util.hh"
6
8
10{
11 b.add_input<decl::Float>("Weight").available(false);
12 b.add_output<decl::Shader>("Holdout");
13}
14
16 bNode *node,
17 bNodeExecData * /*execdata*/,
18 GPUNodeStack *in,
19 GPUNodeStack *out)
20{
21 return GPU_stack_link(mat, node, "node_holdout", in, out);
22}
23
24} // namespace blender::nodes::node_shader_holdout_cc
25
26/* node type definition */
28{
30
31 static blender::bke::bNodeType ntype;
32
33 sh_node_type_base(&ntype, SH_NODE_HOLDOUT, "Holdout", NODE_CLASS_SHADER);
35 ntype.declare = file_ns::node_declare;
36 ntype.gpu_fn = file_ns::gpu_shader_rgb;
37
39}
#define NODE_CLASS_SHADER
Definition BKE_node.hh:417
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
Definition node.cc:1708
static void node_declare(NodeDeclarationBuilder &b)
static int gpu_shader_rgb(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
void register_node_type_sh_holdout()
void sh_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
bool object_shader_nodes_poll(const bContext *C)
Defines a node type.
Definition BKE_node.hh:218
bool(* add_ui_poll)(const bContext *C)
Definition BKE_node.hh:288
NodeGPUExecFunction gpu_fn
Definition BKE_node.hh:318
NodeDeclareFunction declare
Definition BKE_node.hh:347