Blender  V3.3
node_shader_squeeze.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 
8 #include "node_shader_util.hh"
9 
11 
13 {
14  b.add_input<decl::Float>(N_("Value")).default_value(0.0f).min(-100.0f).max(100.0f);
15  b.add_input<decl::Float>(N_("Width")).default_value(1.0f).min(-100.0f).max(100.0f);
16  b.add_input<decl::Float>(N_("Center")).default_value(0.0f).min(-100.0f).max(100.0f);
17  b.add_output<decl::Float>(N_("Value"));
18 }
19 
21  bNode *node,
22  bNodeExecData *UNUSED(execdata),
23  GPUNodeStack *in,
25 {
26  return GPU_stack_link(mat, node, "squeeze", in, out);
27 }
28 
29 } // namespace blender::nodes::node_shader_squeeze_cc
30 
32 {
33  namespace file_ns = blender::nodes::node_shader_squeeze_cc;
34 
35  static bNodeType ntype;
36 
37  sh_node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTER);
40 
41  nodeRegisterType(&ntype);
42 }
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
Definition: node.cc:4465
#define SH_NODE_SQUEEZE
Definition: BKE_node.h:1094
#define NODE_CLASS_CONVERTER
Definition: BKE_node.h:351
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,...)
OperationNode * node
static int gpu_shader_squeeze(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_squeeze()
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)