diff options
author | Hans Goudey <h.goudey@me.com> | 2022-01-25 01:18:30 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-01-25 01:18:30 +0300 |
commit | 2bf519d211b1c51353b827f994494badfdf2569f (patch) | |
tree | a0f836b778fdfd8a48bbf16073c80fb385fd44c9 /source/blender/nodes/NOD_shader.h | |
parent | 4d799db72f9213dbd44b02d0cb24acf856aa2325 (diff) |
Cleanup: Correct location of node function declarations
Currently there are many function declarations in `BKE_node.h` that
don't actually have implementations in blenkernel. This commit moves
the declarations to `NOD_composite.h`, `NOD_texture.h`, and
`NOD_shader.h` instead. This helps to clarify the purpose of the
different modules.
Differential Revision: https://developer.blender.org/D13869
Diffstat (limited to 'source/blender/nodes/NOD_shader.h')
-rw-r--r-- | source/blender/nodes/NOD_shader.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/nodes/NOD_shader.h b/source/blender/nodes/NOD_shader.h index 76c174201e8..65720fc119b 100644 --- a/source/blender/nodes/NOD_shader.h +++ b/source/blender/nodes/NOD_shader.h @@ -143,6 +143,28 @@ void register_node_type_sh_tex_white_noise(void); void register_node_type_sh_custom_group(bNodeType *ntype); +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. + */ +void ntreeGPUMaterialNodes(struct bNodeTree *localtree, + struct GPUMaterial *mat, + bool *has_surface_output, + bool *has_volume_output); + #ifdef __cplusplus } #endif |