Blender
V3.3
source
blender
nodes
shader
node_shader_util.hh
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later
2
* Copyright 2005 Blender Foundation. All rights reserved. */
3
8
#pragma once
9
10
#include <cfloat>
11
#include <cmath>
12
#include <cstring>
13
14
#include "
BLI_blenlib.h
"
15
#include "
BLI_color.hh
"
16
#include "
BLI_math.h
"
17
#include "
BLI_math_base_safe.h
"
18
#include "
BLI_math_vector.hh
"
19
#include "
BLI_rand.h
"
20
#include "
BLI_threads.h
"
21
#include "
BLI_utildefines.h
"
22
23
#include "
BLT_translation.h
"
24
25
#include "
BKE_colorband.h
"
26
#include "
BKE_colortools.h
"
27
#include "
BKE_global.h
"
28
#include "
BKE_image.h
"
29
#include "
BKE_main.h
"
30
#include "
BKE_material.h
"
31
#include "
BKE_node.h
"
32
#include "
BKE_texture.h
"
33
34
#include "
DNA_ID.h
"
35
#include "
DNA_color_types.h
"
36
#include "
DNA_customdata_types.h
"
37
#include "
DNA_image_types.h
"
38
#include "
DNA_material_types.h
"
39
#include "
DNA_node_types.h
"
40
#include "
DNA_object_types.h
"
41
#include "
DNA_scene_types.h
"
42
#include "
DNA_texture_types.h
"
43
44
#include "
FN_multi_function_builder.hh
"
45
46
#include "
GPU_material.h
"
47
#include "
GPU_texture.h
"
48
#include "
GPU_uniform_buffer.h
"
49
50
#include "
IMB_colormanagement.h
"
51
52
#include "
MEM_guardedalloc.h
"
53
54
#include "
NOD_multi_function.hh
"
55
#include "
NOD_shader.h
"
56
#include "
NOD_socket_declarations.hh
"
57
#include "node_util.h"
58
59
#include "
RE_pipeline.h
"
60
#include "
RE_texture.h
"
61
62
bool
sh_node_poll_default
(
struct
bNodeType
*ntype,
63
struct
bNodeTree
*
ntree
,
64
const
char
**r_disabled_hint);
65
void
sh_node_type_base
(
struct
bNodeType
*ntype,
int
type
,
const
char
*name,
short
nclass);
66
void
sh_fn_node_type_base
(
struct
bNodeType
*ntype,
int
type
,
const
char
*name,
short
nclass);
67
68
/* ********* exec data struct, remains internal *********** */
69
70
struct
XYZ_to_RGB
/* Transposed #imbuf_xyz_to_rgb, passed as 3x vec3. */
71
{
72
float
r
[3],
g
[3],
b
[3];
73
};
74
75
void
node_gpu_stack_from_data
(
struct
GPUNodeStack
*gs,
int
type
,
struct
bNodeStack
*ns);
76
void
node_data_from_gpu_stack
(
struct
bNodeStack
*ns,
struct
GPUNodeStack
*gs);
77
void
node_shader_gpu_bump_tex_coord
(
struct
GPUMaterial
*mat,
78
struct
bNode
*
node
,
79
struct
GPUNodeLink
**link);
80
void
node_shader_gpu_default_tex_coord
(
struct
GPUMaterial
*mat,
81
struct
bNode
*
node
,
82
struct
GPUNodeLink
**link);
83
void
node_shader_gpu_tex_mapping
(
struct
GPUMaterial
*mat,
84
struct
bNode
*
node
,
85
struct
GPUNodeStack
*in,
86
struct
GPUNodeStack
*
out
);
87
88
struct
bNodeTreeExec
*
ntreeShaderBeginExecTree_internal
(
struct
bNodeExecContext
*
context
,
89
struct
bNodeTree
*
ntree
,
90
bNodeInstanceKey
parent_key);
91
void
ntreeShaderEndExecTree_internal
(
struct
bNodeTreeExec
*
exec
);
92
93
void
ntreeExecGPUNodes
(
struct
bNodeTreeExec
*
exec
,
94
struct
GPUMaterial
*mat,
95
struct
bNode
*output_node);
96
void
get_XYZ_to_RGB_for_gpu
(
XYZ_to_RGB
*
data
);
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_math.h
BLI_math_base_safe.h
BLI_math_vector.hh
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:151
GPU_material.h
GPU_texture.h
GPU_uniform_buffer.h
IMB_colormanagement.h
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
NOD_multi_function.hh
NOD_shader.h
NOD_socket_declarations.hh
RE_pipeline.h
RE_texture.h
data
data
Definition:
bmesh_operator_api_inline.h:157
node
OperationNode * node
Definition:
deg_builder_cycle.cc:38
ntree
bNodeTree * ntree
Definition:
eevee_shaders.c:155
blender::compositor::context
cl_context context
Definition:
COM_WorkScheduler.cc:73
usdtokens::out
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
ntreeShaderBeginExecTree_internal
struct bNodeTreeExec * ntreeShaderBeginExecTree_internal(struct bNodeExecContext *context, struct bNodeTree *ntree, bNodeInstanceKey parent_key)
Definition:
node_shader_tree.cc:1058
node_data_from_gpu_stack
void node_data_from_gpu_stack(struct bNodeStack *ns, struct GPUNodeStack *gs)
Definition:
node_shader_util.cc:140
ntreeShaderEndExecTree_internal
void ntreeShaderEndExecTree_internal(struct bNodeTreeExec *exec)
Definition:
node_shader_tree.cc:1103
node_gpu_stack_from_data
void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, struct bNodeStack *ns)
Definition:
node_shader_util.cc:93
node_shader_gpu_bump_tex_coord
void node_shader_gpu_bump_tex_coord(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeLink **link)
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.cc:292
get_XYZ_to_RGB_for_gpu
void get_XYZ_to_RGB_for_gpu(XYZ_to_RGB *data)
Definition:
node_shader_util.cc:330
ntreeExecGPUNodes
void ntreeExecGPUNodes(struct bNodeTreeExec *exec, struct GPUMaterial *mat, struct bNode *output_node)
Definition:
node_shader_util.cc:247
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)
sh_fn_node_type_base
void sh_fn_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass)
Definition:
node_shader_util.cc:45
sh_node_type_base
void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass)
Definition:
node_shader_util.cc:36
exec
static void exec(void *data, int UNUSED(thread), bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
Definition:
node_texture_at.c:31
GPUMaterial
Definition:
gpu_material.c:50
GPUNodeLink
Definition:
gpu_node_graph.h:78
GPUNodeStack
Definition:
GPU_material.h:103
XYZ_to_RGB
Definition:
node_shader_util.hh:71
XYZ_to_RGB::r
float r[3]
Definition:
node_shader_util.hh:72
XYZ_to_RGB::b
float b[3]
Definition:
node_shader_util.hh:72
XYZ_to_RGB::g
float g[3]
Definition:
node_shader_util.hh:72
bNodeExecContext
Definition:
source/blender/nodes/intern/node_util.h:18
bNodeInstanceKey
Definition:
DNA_node_types.h:390
bNodeStack
Definition:
DNA_node_types.h:37
bNodeTreeExec
Definition:
node_exec.h:39
bNodeTree
Definition:
DNA_node_types.h:451
bNodeType
Defines a node type.
Definition:
BKE_node.h:226
bNode
Definition:
DNA_node_types.h:252
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1