Blender V5.0
COM_utilities_gpu_material.hh
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#pragma once
6
7#include "BLI_string_ref.hh"
8
9#include "DNA_node_types.h"
10
11#include "GPU_material.hh"
12
13namespace blender::compositor {
14
15/* Returns the GPU node stack of the input with the given identifier in the given node within the
16 * given inputs stack array. See the ShaderNode class for more information. */
17GPUNodeStack &get_shader_node_input(const bNode &node,
18 GPUNodeStack inputs[],
19 StringRef identifier);
20
21/* Returns the GPU node stack of the output with the given identifier in the given node within the
22 * given output stack array. See the ShaderNode class for more information. */
23GPUNodeStack &get_shader_node_output(const bNode &node,
24 GPUNodeStack outputs[],
25 StringRef identifier);
26
27/* Returns the GPU node link of the input with the given identifier in the given node within the
28 * given inputs stack array, if the input is not linked, a uniform link carrying the value of the
29 * input will be created and returned. It is expected that the caller will use the returned link in
30 * a GPU material, otherwise, the link may not be properly freed. See the ShaderNode class for more
31 * information. */
32GPUNodeLink *get_shader_node_input_link(const bNode &node,
33 GPUNodeStack inputs[],
34 StringRef identifier);
35
36} // namespace blender::compositor
struct bNode bNode
GPUNodeStack & get_shader_node_input(const bNode &node, GPUNodeStack inputs[], StringRef identifier)
GPUNodeStack & get_shader_node_output(const bNode &node, GPUNodeStack outputs[], StringRef identifier)
GPUNodeLink * get_shader_node_input_link(const bNode &node, GPUNodeStack inputs[], StringRef identifier)
static blender::bke::bNodeSocketTemplate outputs[]
static blender::bke::bNodeSocketTemplate inputs[]