Blender
V5.0
source
blender
compositor
utilities
intern
compositor/utilities/intern/gpu_material.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2025 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#include "
BLI_string_ref.hh
"
6
7
#include "
DNA_node_types.h
"
8
9
#include "
BKE_node_runtime.hh
"
10
11
#include "
GPU_material.hh
"
12
13
#include "
COM_utilities_gpu_material.hh
"
14
15
namespace
blender::compositor
{
16
17
GPUNodeStack
&
get_shader_node_input
(
const
bNode
&node,
18
GPUNodeStack
inputs
[],
19
const
StringRef
identifier)
20
{
21
return
inputs
[node.input_by_identifier(identifier)->index()];
22
}
23
24
GPUNodeStack
&
get_shader_node_output
(
const
bNode
&node,
25
GPUNodeStack
outputs
[],
26
const
StringRef
identifier)
27
{
28
return
outputs
[node.output_by_identifier(identifier)->index()];
29
}
30
31
GPUNodeLink
*
get_shader_node_input_link
(
const
bNode
&node,
32
GPUNodeStack
inputs
[],
33
const
StringRef
identifier)
34
{
35
GPUNodeStack
&
input
=
get_shader_node_input
(node,
inputs
, identifier);
36
if
(
input
.link) {
37
return
input
.link;
38
}
39
return
GPU_uniform
(
input
.vec);
40
}
41
42
}
// namespace blender::compositor
BKE_node_runtime.hh
BLI_string_ref.hh
COM_utilities_gpu_material.hh
DNA_node_types.h
GPU_material.hh
GPU_uniform
GPUNodeLink * GPU_uniform(const float *num)
Definition
gpu_node_graph.cc:661
blender::StringRef
Definition
BLI_string_ref.hh:150
input
#define input
Definition
gpu_shader_compat_cxx.hh:170
blender::compositor
Definition
BKE_node.hh:77
blender::compositor::get_shader_node_input
GPUNodeStack & get_shader_node_input(const bNode &node, GPUNodeStack inputs[], StringRef identifier)
Definition
compositor/utilities/intern/gpu_material.cc:17
blender::compositor::get_shader_node_output
GPUNodeStack & get_shader_node_output(const bNode &node, GPUNodeStack outputs[], StringRef identifier)
Definition
compositor/utilities/intern/gpu_material.cc:24
blender::compositor::get_shader_node_input_link
GPUNodeLink * get_shader_node_input_link(const bNode &node, GPUNodeStack inputs[], StringRef identifier)
Definition
compositor/utilities/intern/gpu_material.cc:31
outputs
static blender::bke::bNodeSocketTemplate outputs[]
Definition
node_texture_at.cc:16
inputs
static blender::bke::bNodeSocketTemplate inputs[]
Definition
node_texture_at.cc:11
GPUNodeLink
Definition
gpu_node_graph.hh:82
GPUNodeStack
Definition
GPU_material.hh:295
bNode
Definition
DNA_node_types.h:422
Generated on
for Blender by
doxygen
1.16.1