Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.c
| Show All 38 Lines | |||||
| }; | }; | ||||
| static bNodeSocketTemplate sh_node_sepxyz_out[] = { | static bNodeSocketTemplate sh_node_sepxyz_out[] = { | ||||
| { SOCK_FLOAT, 0, N_("X")}, | { SOCK_FLOAT, 0, N_("X")}, | ||||
| { SOCK_FLOAT, 0, N_("Y")}, | { SOCK_FLOAT, 0, N_("Y")}, | ||||
| { SOCK_FLOAT, 0, N_("Z")}, | { SOCK_FLOAT, 0, N_("Z")}, | ||||
| { -1, 0, "" } | { -1, 0, "" } | ||||
| }; | }; | ||||
| static int gpu_shader_sepxyz(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | static int gpu_shader_sepxyz(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| { | { | ||||
| return GPU_stack_link(mat, "separate_xyz", in, out); | return GPU_stack_link(mat, node, "separate_xyz", in, out); | ||||
| } | } | ||||
| void register_node_type_sh_sepxyz(void) | void register_node_type_sh_sepxyz(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_SEPXYZ, "Separate XYZ", NODE_CLASS_CONVERTOR, 0); | sh_node_type_base(&ntype, SH_NODE_SEPXYZ, "Separate XYZ", NODE_CLASS_CONVERTOR, 0); | ||||
| node_type_compatibility(&ntype, NODE_NEW_SHADING); | node_type_compatibility(&ntype, NODE_NEW_SHADING); | ||||
| Show All 12 Lines | static bNodeSocketTemplate sh_node_combxyz_in[] = { | ||||
| { SOCK_FLOAT, 1, N_("Z"), 0.0f, 0.0f, 0.0f, 1.0f, -10000.0f, 10000.0f}, | { SOCK_FLOAT, 1, N_("Z"), 0.0f, 0.0f, 0.0f, 1.0f, -10000.0f, 10000.0f}, | ||||
| { -1, 0, "" } | { -1, 0, "" } | ||||
| }; | }; | ||||
| static bNodeSocketTemplate sh_node_combxyz_out[] = { | static bNodeSocketTemplate sh_node_combxyz_out[] = { | ||||
| { SOCK_VECTOR, 0, N_("Vector")}, | { SOCK_VECTOR, 0, N_("Vector")}, | ||||
| { -1, 0, "" } | { -1, 0, "" } | ||||
| }; | }; | ||||
| static int gpu_shader_combxyz(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | static int gpu_shader_combxyz(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| { | { | ||||
| return GPU_stack_link(mat, "combine_xyz", in, out); | return GPU_stack_link(mat, node, "combine_xyz", in, out); | ||||
| } | } | ||||
| void register_node_type_sh_combxyz(void) | void register_node_type_sh_combxyz(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_COMBXYZ, "Combine XYZ", NODE_CLASS_CONVERTOR, 0); | sh_node_type_base(&ntype, SH_NODE_COMBXYZ, "Combine XYZ", NODE_CLASS_CONVERTOR, 0); | ||||
| node_type_compatibility(&ntype, NODE_NEW_SHADING); | node_type_compatibility(&ntype, NODE_NEW_SHADING); | ||||
| node_type_socket_templates(&ntype, sh_node_combxyz_in, sh_node_combxyz_out); | node_type_socket_templates(&ntype, sh_node_combxyz_in, sh_node_combxyz_out); | ||||
| node_type_gpu(&ntype, gpu_shader_combxyz); | node_type_gpu(&ntype, gpu_shader_combxyz); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||