Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_normal_map.cc
| Show All 34 Lines | |||||
| }; | }; | ||||
| static void node_shader_init_normal_map(bNodeTree *UNUSED(ntree), bNode *node) | static void node_shader_init_normal_map(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| NodeShaderNormalMap *attr = MEM_cnew<NodeShaderNormalMap>("NodeShaderNormalMap"); | NodeShaderNormalMap *attr = MEM_cnew<NodeShaderNormalMap>("NodeShaderNormalMap"); | ||||
| node->storage = attr; | node->storage = attr; | ||||
| } | } | ||||
| static void node_shader_exec_normal_map(void *UNUSED(data), | |||||
| int UNUSED(thread), | |||||
| bNode *UNUSED(node), | |||||
| bNodeExecData *UNUSED(execdata), | |||||
| bNodeStack **UNUSED(in), | |||||
| bNodeStack **UNUSED(out)) | |||||
| { | |||||
| } | |||||
| static int gpu_shader_normal_map(GPUMaterial *mat, | static int gpu_shader_normal_map(GPUMaterial *mat, | ||||
| bNode *node, | bNode *node, | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| GPUNodeStack *in, | GPUNodeStack *in, | ||||
| GPUNodeStack *out) | GPUNodeStack *out) | ||||
| { | { | ||||
| NodeShaderNormalMap *nm = static_cast<NodeShaderNormalMap *>(node->storage); | NodeShaderNormalMap *nm = static_cast<NodeShaderNormalMap *>(node->storage); | ||||
| ▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | void register_node_type_sh_normal_map() | ||||
| sh_node_type_base(&ntype, SH_NODE_NORMAL_MAP, "Normal Map", NODE_CLASS_OP_VECTOR); | sh_node_type_base(&ntype, SH_NODE_NORMAL_MAP, "Normal Map", NODE_CLASS_OP_VECTOR); | ||||
| node_type_socket_templates( | node_type_socket_templates( | ||||
| &ntype, file_ns::sh_node_normal_map_in, file_ns::sh_node_normal_map_out); | &ntype, file_ns::sh_node_normal_map_in, file_ns::sh_node_normal_map_out); | ||||
| node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); | node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); | ||||
| node_type_init(&ntype, file_ns::node_shader_init_normal_map); | node_type_init(&ntype, file_ns::node_shader_init_normal_map); | ||||
| node_type_storage( | node_type_storage( | ||||
| &ntype, "NodeShaderNormalMap", node_free_standard_storage, node_copy_standard_storage); | &ntype, "NodeShaderNormalMap", node_free_standard_storage, node_copy_standard_storage); | ||||
| node_type_gpu(&ntype, file_ns::gpu_shader_normal_map); | node_type_gpu(&ntype, file_ns::gpu_shader_normal_map); | ||||
| node_type_exec(&ntype, nullptr, nullptr, file_ns::node_shader_exec_normal_map); | |||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||