20 #include "../node_shader_util.h"
27 {
SOCK_VECTOR,
N_(
"Generated"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
28 {
SOCK_VECTOR,
N_(
"Normal"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
30 {
SOCK_VECTOR,
N_(
"Object"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
31 {
SOCK_VECTOR,
N_(
"Camera"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
32 {
SOCK_VECTOR,
N_(
"Window"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
33 {
SOCK_VECTOR,
N_(
"Reflection"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
56 if (out[0].hasoutput) {
57 GPU_link(mat,
"generated_from_orco", orco, &orco);
61 mat,
node,
"node_tex_coord", in, out, viewpos, worldnor, inv_obmat, texcofacs, orco, mtface);
70 if (
node->branch_tag != 0 &&
ELEM(i, 1, 6)) {
72 "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)
GPUNodeLink * GPU_constant(const float *num)
@ GPU_INVERSE_OBJECT_MATRIX
@ GPU_CAMERA_TEXCO_FACTORS
GPUNodeLink * GPU_uniform(const float *num)
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 Light Particle Volume Image Sky Noise Wave Voronoi Brick SH_NODE_TEX_COORD
void register_node_type_sh_tex_coord(void)
static int node_shader_gpu_tex_coord(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
static bNodeSocketTemplate sh_node_tex_coord_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.