Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_normal_map.c
| Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | static int gpu_shader_normal_map(GPUMaterial *mat, | ||||
| return true; | return true; | ||||
| } | } | ||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_normal_map(void) | void register_node_type_sh_normal_map(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_NORMAL_MAP, "Normal Map", NODE_CLASS_OP_VECTOR, 0); | sh_node_type_base(&ntype, SH_NODE_NORMAL_MAP, "Normal Map", NODE_CLASS_OP_VECTOR); | ||||
| node_type_socket_templates(&ntype, sh_node_normal_map_in, sh_node_normal_map_out); | node_type_socket_templates(&ntype, sh_node_normal_map_in, 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, node_shader_init_normal_map); | node_type_init(&ntype, 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, gpu_shader_normal_map); | node_type_gpu(&ntype, gpu_shader_normal_map); | ||||
| node_type_exec(&ntype, NULL, NULL, node_shader_exec_normal_map); | node_type_exec(&ntype, NULL, NULL, node_shader_exec_normal_map); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||