From 6cd595424679c8c29848c797d079cfd7c7b73d6d Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Fri, 13 Jun 2014 23:23:35 +0200 Subject: Implement GLSL code for XYZ nodes. --- source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/nodes') diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.c b/source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.c index b02a1a9c2dc..605a3b9faa3 100644 --- a/source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.c +++ b/source/blender/nodes/shader/nodes/node_shader_sepcombXYZ.c @@ -44,7 +44,7 @@ static bNodeSocketTemplate sh_node_sepxyz_out[] = { { -1, 0, "" } }; -static int gpu_shader_sep(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) +static int gpu_shader_sepxyz(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) { return GPU_stack_link(mat, "separate_xyz", in, out); } @@ -56,6 +56,7 @@ void register_node_type_sh_sepxyz(void) sh_node_type_base(&ntype, SH_NODE_SEPXYZ, "Separate XYZ", NODE_CLASS_CONVERTOR, 0); node_type_compatibility(&ntype, NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_sepxyz_in, sh_node_sepxyz_out); + node_type_gpu(&ntype, gpu_shader_sepxyz); nodeRegisterType(&ntype); } @@ -74,6 +75,11 @@ static bNodeSocketTemplate sh_node_combxyz_out[] = { { -1, 0, "" } }; +static int gpu_shader_combxyz(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) +{ + return GPU_stack_link(mat, "combine_xyz", in, out); +} + void register_node_type_sh_combxyz(void) { static bNodeType ntype; @@ -81,6 +87,7 @@ void register_node_type_sh_combxyz(void) sh_node_type_base(&ntype, SH_NODE_COMBXYZ, "Combine XYZ", NODE_CLASS_CONVERTOR, 0); node_type_compatibility(&ntype, NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_combxyz_in, sh_node_combxyz_out); + node_type_gpu(&ntype, gpu_shader_combxyz); nodeRegisterType(&ntype); } -- cgit v1.2.3