Blender  V3.3
node_shader_rgb_to_bw.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 "IMB_colormanagement.h"
9 
10 #include "node_shader_util.hh"
11 
13 
15 {
16  b.add_input<decl::Color>(N_("Color")).default_value({0.5f, 0.5f, 0.5f, 1.0f});
17  b.add_output<decl::Float>(N_("Val"));
18 }
19 
21  bNode *node,
22  bNodeExecData *UNUSED(execdata),
23  GPUNodeStack *in,
25 {
26  return GPU_stack_link(mat, node, "rgbtobw", in, out);
27 }
28 
29 } // namespace blender::nodes::node_shader_rgb_to_bw_cc
30 
32 {
33  namespace file_ns = blender::nodes::node_shader_rgb_to_bw_cc;
34 
35  static bNodeType ntype;
36 
40 
41  nodeRegisterType(&ntype);
42 }
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
Definition: node.cc:4465
#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,...)
Group Output data from inside of a node group A color picker Mix two input colors SH_NODE_RGBTOBW
OperationNode * node
static void sh_node_rgbtobw_declare(NodeDeclarationBuilder &b)
static int gpu_shader_rgbtobw(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 register_node_type_sh_rgbtobw()
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)