Blender  V3.3
node_shader_light_path.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2005 Blender Foundation. All rights reserved. */
3 
4 #include "node_shader_util.hh"
5 
7 
9 {
10  b.add_output<decl::Float>(N_("Is Camera Ray"));
11  b.add_output<decl::Float>(N_("Is Shadow Ray"));
12  b.add_output<decl::Float>(N_("Is Diffuse Ray"));
13  b.add_output<decl::Float>(N_("Is Glossy Ray"));
14  b.add_output<decl::Float>(N_("Is Singular Ray"));
15  b.add_output<decl::Float>(N_("Is Reflection Ray"));
16  b.add_output<decl::Float>(N_("Is Transmission Ray"));
17  b.add_output<decl::Float>(N_("Ray Length"));
18  b.add_output<decl::Float>(N_("Ray Depth"));
19  b.add_output<decl::Float>(N_("Diffuse Depth"));
20  b.add_output<decl::Float>(N_("Glossy Depth"));
21  b.add_output<decl::Float>(N_("Transparent Depth"));
22  b.add_output<decl::Float>(N_("Transmission Depth"));
23 }
24 
26  bNode *node,
27  bNodeExecData *UNUSED(execdata),
28  GPUNodeStack *in,
30 {
31  return GPU_stack_link(mat, node, "node_light_path", in, out);
32 }
33 
34 } // namespace blender::nodes::node_shader_light_path_cc
35 
36 /* node type definition */
38 {
40 
41  static bNodeType ntype;
42 
46 
47  nodeRegisterType(&ntype);
48 }
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
Definition: node.cc:4465
#define NODE_CLASS_INPUT
Definition: BKE_node.h:345
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
#define SH_NODE_LIGHT_PATH
Definition: BKE_node.h:1117
#define UNUSED(x)
bool GPU_stack_link(GPUMaterial *mat, struct bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
OperationNode * node
static int node_shader_gpu_light_path(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_sh_light_path()
void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass)
Defines a node type.
Definition: BKE_node.h:226
NodeDeclareFunction declare
Definition: BKE_node.h:324
#define N_(msgid)