2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2005 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2007-03-24 06:57:29 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup nodes
|
2011-02-21 06:58:46 +00:00
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#pragma once
|
2007-03-24 06:57:29 +00:00
|
|
|
|
2024-02-19 15:26:10 +01:00
|
|
|
#include "BKE_node.hh"
|
2007-03-24 06:57:29 +00:00
|
|
|
|
2024-05-13 16:07:12 +02:00
|
|
|
extern struct blender::bke::bNodeTreeType *ntreeType_Shader;
|
2011-09-05 21:01:50 +00:00
|
|
|
|
2024-05-13 16:07:12 +02:00
|
|
|
void register_node_type_sh_custom_group(blender::bke::bNodeType *ntype);
|
2019-03-16 18:48:22 +01:00
|
|
|
|
2022-01-24 16:18:30 -06:00
|
|
|
struct bNodeTreeExec *ntreeShaderBeginExecTree(struct bNodeTree *ntree);
|
|
|
|
|
void ntreeShaderEndExecTree(struct bNodeTreeExec *exec);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Find an output node of the shader tree.
|
|
|
|
|
*
|
|
|
|
|
* \note it will only return output which is NOT in the group, which isn't how
|
|
|
|
|
* render engines works but it's how the GPU shader compilation works. This we
|
|
|
|
|
* can change in the future and make it a generic function, but for now it stays
|
|
|
|
|
* private here.
|
|
|
|
|
*/
|
|
|
|
|
struct bNode *ntreeShaderOutputNode(struct bNodeTree *ntree, int target);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This one needs to work on a local tree.
|
|
|
|
|
*/
|
2022-04-14 18:47:58 +02:00
|
|
|
void ntreeGPUMaterialNodes(struct bNodeTree *localtree, struct GPUMaterial *mat);
|