20 #include "../node_shader_util.h"
25 {
SOCK_VECTOR,
N_(
"Position"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
26 {
SOCK_VECTOR,
N_(
"Normal"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
27 {
SOCK_VECTOR,
N_(
"Tangent"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
28 {
SOCK_VECTOR,
N_(
"True Normal"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
29 {
SOCK_VECTOR,
N_(
"Incoming"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
30 {
SOCK_VECTOR,
N_(
"Parametric"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
31 {
SOCK_FLOAT,
N_(
"Backfacing"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
32 {
SOCK_FLOAT,
N_(
"Pointiness"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
33 {
SOCK_FLOAT,
N_(
"Random Per Island"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
45 const float val[4] = {0.0f, 0.0f, 0.0f, 0.0f};
48 if (out[5].hasoutput) {
74 if (
node->branch_tag != 0 &&
ELEM(i, 1, 2, 4)) {
76 "vector_math_normalize",
void node_type_gpu(struct bNodeType *ntype, NodeGPUExecFunction gpu_fn)
void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs)
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
void node_type_storage(struct bNodeType *ntype, const char *storagename, void(*freefunc)(struct bNode *node), void(*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node))
void nodeRegisterType(struct bNodeType *ntype)
GPUNodeLink * GPU_builtin(eGPUBuiltin builtin)
GPUNodeLink * GPU_attribute(GPUMaterial *mat, CustomDataType type, const char *name)
@ GPU_MATFLAG_BARYCENTRIC
GPUNodeLink * GPU_constant(const float *num)
@ GPU_INVERSE_VIEW_MATRIX
void GPU_material_flag_set(GPUMaterial *mat, eGPUMatFlag flag)
bool GPU_link(GPUMaterial *mat, const char *name,...)
bool GPU_stack_link(GPUMaterial *mat, struct bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled SH_NODE_NEW_GEOMETRY
static bNodeSocketTemplate sh_node_geometry_out[]
void register_node_type_sh_geometry(void)
static int node_shader_gpu_geometry(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag)
void node_shader_gpu_bump_tex_coord(GPUMaterial *mat, bNode *node, GPUNodeLink **link)
Compact definition of a node socket.