Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_uvmap.c
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | static void node_shader_init_uvmap(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| node->storage = attr; | node->storage = attr; | ||||
| } | } | ||||
| static int node_shader_gpu_uvmap(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | static int node_shader_gpu_uvmap(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| { | { | ||||
| NodeShaderUVMap *attr = node->storage; | NodeShaderUVMap *attr = node->storage; | ||||
| GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, attr->uv_map); | GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, attr->uv_map); | ||||
| return GPU_stack_link(mat, "node_uvmap", in, out, mtface); | return GPU_stack_link(mat, node, "node_uvmap", in, out, mtface); | ||||
| } | } | ||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_uvmap(void) | void register_node_type_sh_uvmap(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_UVMAP, "UV Map", NODE_CLASS_INPUT, 0); | sh_node_type_base(&ntype, SH_NODE_UVMAP, "UV Map", NODE_CLASS_INPUT, 0); | ||||
| Show All 9 Lines | |||||