Blender V4.3
node_shader_squeeze.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
9#include "node_shader_util.hh"
10
12
14{
15 b.add_input<decl::Float>("Value").default_value(0.0f).min(-100.0f).max(100.0f);
16 b.add_input<decl::Float>("Width").default_value(1.0f).min(-100.0f).max(100.0f);
17 b.add_input<decl::Float>("Center").default_value(0.0f).min(-100.0f).max(100.0f);
18 b.add_output<decl::Float>("Value");
19}
20
22 bNode *node,
23 bNodeExecData * /*execdata*/,
24 GPUNodeStack *in,
25 GPUNodeStack *out)
26{
27 return GPU_stack_link(mat, node, "squeeze", in, out);
28}
29
30} // namespace blender::nodes::node_shader_squeeze_cc
31
33{
35
36 static blender::bke::bNodeType ntype;
37
38 sh_node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value (Legacy)", NODE_CLASS_CONVERTER);
39 ntype.gather_link_search_ops = nullptr;
40 ntype.declare = file_ns::node_declare;
41 ntype.gpu_fn = file_ns::gpu_shader_squeeze;
42
44}
#define SH_NODE_SQUEEZE
Definition BKE_node.hh:906
#define NODE_CLASS_CONVERTER
Definition BKE_node.hh:410
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 int gpu_shader_squeeze(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
void register_node_type_sh_squeeze()
void sh_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
Defines a node type.
Definition BKE_node.hh:218
NodeGPUExecFunction gpu_fn
Definition BKE_node.hh:318
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
Definition BKE_node.hh:363
NodeDeclareFunction declare
Definition BKE_node.hh:347