Blender
V2.93
source
blender
nodes
shader
node_shader_util.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*
16
* The Original Code is Copyright (C) 2005 Blender Foundation.
17
* All rights reserved.
18
*/
19
24
#pragma once
25
26
#include <float.h>
27
#include <math.h>
28
#include <string.h>
29
30
#include "
MEM_guardedalloc.h
"
31
32
#include "
DNA_ID.h
"
33
#include "
DNA_color_types.h
"
34
#include "
DNA_customdata_types.h
"
35
#include "
DNA_image_types.h
"
36
#include "
DNA_material_types.h
"
37
#include "
DNA_node_types.h
"
38
#include "
DNA_object_types.h
"
39
#include "
DNA_scene_types.h
"
40
#include "
DNA_texture_types.h
"
41
42
#include "
BLI_blenlib.h
"
43
#include "
BLI_math.h
"
44
#include "
BLI_math_base_safe.h
"
45
#include "
BLI_rand.h
"
46
#include "
BLI_threads.h
"
47
#include "
BLI_utildefines.h
"
48
49
#include "
BKE_colorband.h
"
50
#include "
BKE_colortools.h
"
51
#include "
BKE_global.h
"
52
#include "
BKE_image.h
"
53
#include "
BKE_main.h
"
54
#include "
BKE_material.h
"
55
#include "
BKE_node.h
"
56
#include "
BKE_texture.h
"
57
58
#include "
NOD_shader.h
"
59
#include "
node_util.h
"
60
61
#include "
BLT_translation.h
"
62
63
#include "
IMB_colormanagement.h
"
64
65
#include "
RE_pipeline.h
"
66
#include "
RE_texture.h
"
67
68
#include "
GPU_material.h
"
69
#include "
GPU_texture.h
"
70
#include "
GPU_uniform_buffer.h
"
71
72
#ifdef __cplusplus
73
# include "
FN_multi_function_builder.hh
"
74
75
# include "
NOD_node_tree_multi_function.hh
"
76
77
# include "
BLI_color.hh
"
78
# include "
BLI_float3.hh
"
79
80
extern
"C"
{
81
#endif
82
83
bool
sh_node_poll_default
(
struct
bNodeType
*ntype,
84
struct
bNodeTree
*
ntree
,
85
const
char
**r_disabled_hint);
86
void
sh_node_type_base
(
87
struct
bNodeType
*ntype,
int
type
,
const
char
*name,
short
nclass,
short
flag);
88
void
sh_fn_node_type_base
(
89
struct
bNodeType
*ntype,
int
type
,
const
char
*name,
short
nclass,
short
flag);
90
91
/* ********* exec data struct, remains internal *********** */
92
93
typedef
struct
ShaderCallData
{
94
/* Empty for now, may be reused if we convert shader to texture nodes. */
95
int
dummy
;
96
}
ShaderCallData
;
97
98
void
nodestack_get_vec
(
float
*in,
short
type_in,
bNodeStack
*ns);
99
100
void
node_gpu_stack_from_data
(
struct
GPUNodeStack
*gs,
int
type
,
struct
bNodeStack
*ns);
101
void
node_data_from_gpu_stack
(
struct
bNodeStack
*ns,
struct
GPUNodeStack
*gs);
102
void
node_shader_gpu_bump_tex_coord
(
struct
GPUMaterial
*mat,
103
struct
bNode
*
node
,
104
struct
GPUNodeLink
**link);
105
void
node_shader_gpu_default_tex_coord
(
struct
GPUMaterial
*mat,
106
struct
bNode
*
node
,
107
struct
GPUNodeLink
**link);
108
void
node_shader_gpu_tex_mapping
(
struct
GPUMaterial
*mat,
109
struct
bNode
*
node
,
110
struct
GPUNodeStack
*in,
111
struct
GPUNodeStack
*out);
112
113
void
ntreeExecGPUNodes
(
struct
bNodeTreeExec
*
exec
,
114
struct
GPUMaterial
*mat,
115
struct
bNode
*output_node);
116
117
#ifdef __cplusplus
118
}
119
#endif
BKE_colorband.h
BKE_colortools.h
BKE_global.h
BKE_image.h
BKE_main.h
BKE_material.h
General operations, lookup, etc. for materials.
BKE_node.h
BKE_texture.h
BLI_blenlib.h
BLI_color.hh
BLI_float3.hh
BLI_math.h
BLI_math_base_safe.h
BLI_rand.h
Random number functions.
BLI_threads.h
BLI_utildefines.h
BLT_translation.h
DNA_ID.h
ID and Library types, which are fundamental for sdna.
DNA_color_types.h
DNA_customdata_types.h
DNA_image_types.h
DNA_material_types.h
DNA_node_types.h
DNA_object_types.h
Object is a sort of wrapper for general info.
DNA_scene_types.h
DNA_texture_types.h
FN_multi_function_builder.hh
type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Definition:
GPU_legacy_stubs.h:167
GPU_material.h
GPU_texture.h
GPU_uniform_buffer.h
IMB_colormanagement.h
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
NOD_node_tree_multi_function.hh
NOD_shader.h
RE_pipeline.h
RE_texture.h
node
OperationNode * node
Definition:
deg_builder_cycle.cc:54
ntree
bNodeTree * ntree
Definition:
eevee_shaders.c:170
node_data_from_gpu_stack
void node_data_from_gpu_stack(struct bNodeStack *ns, struct GPUNodeStack *gs)
Definition:
node_shader_util.c:154
sh_node_type_base
void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag)
Definition:
node_shader_util.c:50
ShaderCallData
struct ShaderCallData ShaderCallData
nodestack_get_vec
void nodestack_get_vec(float *in, short type_in, bNodeStack *ns)
Definition:
node_shader_util.c:68
node_gpu_stack_from_data
void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, struct bNodeStack *ns)
Definition:
node_shader_util.c:107
node_shader_gpu_bump_tex_coord
void node_shader_gpu_bump_tex_coord(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeLink **link)
Definition:
node_shader_util.c:282
node_shader_gpu_default_tex_coord
void node_shader_gpu_default_tex_coord(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeLink **link)
Definition:
node_shader_util.c:297
ntreeExecGPUNodes
void ntreeExecGPUNodes(struct bNodeTreeExec *exec, struct GPUMaterial *mat, struct bNode *output_node)
Definition:
node_shader_util.c:242
sh_fn_node_type_base
void sh_fn_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag)
Definition:
node_shader_util.c:60
node_shader_gpu_tex_mapping
void node_shader_gpu_tex_mapping(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out)
sh_node_poll_default
bool sh_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree, const char **r_disabled_hint)
exec
static void exec(void *data, int UNUSED(thread), bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
Definition:
node_texture_at.c:47
node_util.h
GPUMaterial
Definition:
gpu_material.c:65
GPUNodeLink
Definition:
gpu_node_graph.h:80
GPUNodeStack
Definition:
GPU_material.h:116
ShaderCallData
Definition:
node_shader_util.h:93
ShaderCallData::dummy
int dummy
Definition:
node_shader_util.h:95
bNodeStack
Definition:
DNA_node_types.h:51
bNodeTreeExec
Definition:
node_exec.h:55
bNodeTree
Definition:
DNA_node_types.h:426
bNodeType
Defines a node type.
Definition:
BKE_node.h:221
bNode
Definition:
DNA_node_types.h:212
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1