Blender  V3.3
node_shader_volume_scatter.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_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
11  b.add_input<decl::Float>(N_("Density")).default_value(1.0f).min(0.0f).max(1000.0f);
12  b.add_input<decl::Float>(N_("Anisotropy"))
13  .default_value(0.0f)
14  .min(-1.0f)
15  .max(1.0f)
16  .subtype(PROP_FACTOR);
17  b.add_input<decl::Float>(N_("Weight")).unavailable();
18  b.add_output<decl::Shader>(N_("Volume"));
19 }
20 
22  bNode *node,
23  bNodeExecData *UNUSED(execdata),
24  GPUNodeStack *in,
26 {
27  return GPU_stack_link(mat, node, "node_volume_scatter", in, out);
28 }
29 
30 } // namespace blender::nodes::node_shader_volume_scatter_cc
31 
32 /* node type definition */
34 {
36 
37  static bNodeType ntype;
38 
42 
43  nodeRegisterType(&ntype);
44 }
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
Definition: node.cc:4465
#define NODE_CLASS_SHADER
Definition: BKE_node.h:358
#define SH_NODE_VOLUME_SCATTER
Definition: BKE_node.h:1133
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
#define UNUSED(x)
bool GPU_stack_link(GPUMaterial *mat, struct bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
@ PROP_FACTOR
Definition: RNA_types.h:144
OperationNode * node
static void node_declare(NodeDeclarationBuilder &b)
static int node_shader_gpu_volume_scatter(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass)
void register_node_type_sh_volume_scatter()
Defines a node type.
Definition: BKE_node.h:226
NodeDeclareFunction declare
Definition: BKE_node.h:324
#define N_(msgid)