Blender  V3.3
node_shader_gamma.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2006 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({1.0f, 1.0f, 1.0f, 1.0f});
11  b.add_input<decl::Float>(N_("Gamma"))
12  .default_value(1.0f)
13  .min(0.001f)
14  .max(10.0f)
15  .subtype(PROP_UNSIGNED);
16  b.add_output<decl::Color>(N_("Color"));
17 }
18 
20  bNode *node,
21  bNodeExecData *UNUSED(execdata),
22  GPUNodeStack *in,
24 {
25  return GPU_stack_link(mat, node, "node_gamma", in, out);
26 }
27 
28 } // namespace blender::nodes::node_shader_gamma_cc
29 
31 {
32  namespace file_ns = blender::nodes::node_shader_gamma_cc;
33 
34  static bNodeType ntype;
35 
39 
40  nodeRegisterType(&ntype);
41 }
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
Definition: node.cc:4465
#define SH_NODE_GAMMA
Definition: BKE_node.h:1134
#define NODE_CLASS_OP_COLOR
Definition: BKE_node.h:347
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_UNSIGNED
Definition: RNA_types.h:142
OperationNode * node
static int node_shader_gpu_gamma(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_gamma()
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)