Blender  V3.3
node_shader_shader_to_rgb.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::Shader>(N_("Shader"));
11  b.add_output<decl::Color>(N_("Color"));
12  b.add_output<decl::Float>(N_("Alpha"));
13 }
14 
16  bNode *node,
17  bNodeExecData *UNUSED(execdata),
18  GPUNodeStack *in,
20 {
22 
23  return GPU_stack_link(mat, node, "node_shader_to_rgba", in, out);
24 }
25 
26 } // namespace blender::nodes::node_shader_shader_to_rgb_cc
27 
28 /* node type definition */
30 {
32 
33  static bNodeType ntype;
34 
38 
39  nodeRegisterType(&ntype);
40 }
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
Definition: node.cc:4465
#define NODE_CLASS_CONVERTER
Definition: BKE_node.h:351
#define SH_NODE_SHADERTORGB
Definition: BKE_node.h:1084
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
#define UNUSED(x)
@ GPU_MATFLAG_SHADER_TO_RGBA
Definition: GPU_material.h:78
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
Definition: gpu_material.c:596
bool GPU_stack_link(GPUMaterial *mat, struct bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
OperationNode * node
static int node_shader_gpu_shadertorgb(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_shadertorgb()
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)