Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_curves.c
| Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static int gpu_shader_curve_vec(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | static int gpu_shader_curve_vec(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| { | { | ||||
| float *array; | float *array; | ||||
| int size; | int size; | ||||
| curvemapping_table_RGBA(node->storage, &array, &size); | curvemapping_table_RGBA(node->storage, &array, &size); | ||||
| return GPU_stack_link(mat, "curves_vec", in, out, GPU_texture(size, array)); | return GPU_stack_link(mat, node, "curves_vec", in, out, GPU_texture(size, array)); | ||||
| } | } | ||||
| void register_node_type_sh_curve_vec(void) | void register_node_type_sh_curve_vec(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, 0); | sh_node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, 0); | ||||
| node_type_compatibility(&ntype, NODE_OLD_SHADING | NODE_NEW_SHADING); | node_type_compatibility(&ntype, NODE_OLD_SHADING | NODE_NEW_SHADING); | ||||
| ▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
| static int gpu_shader_curve_rgb(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | static int gpu_shader_curve_rgb(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| { | { | ||||
| float *array; | float *array; | ||||
| int size; | int size; | ||||
| curvemapping_initialize(node->storage); | curvemapping_initialize(node->storage); | ||||
| curvemapping_table_RGBA(node->storage, &array, &size); | curvemapping_table_RGBA(node->storage, &array, &size); | ||||
| return GPU_stack_link(mat, "curves_rgb", in, out, GPU_texture(size, array)); | return GPU_stack_link(mat, node, "curves_rgb", in, out, GPU_texture(size, array)); | ||||
| } | } | ||||
| void register_node_type_sh_curve_rgb(void) | void register_node_type_sh_curve_rgb(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, 0); | sh_node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, 0); | ||||
| node_type_compatibility(&ntype, NODE_OLD_SHADING | NODE_NEW_SHADING); | node_type_compatibility(&ntype, NODE_OLD_SHADING | NODE_NEW_SHADING); | ||||
| Show All 9 Lines | |||||