Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_value.c
| Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | static int gpu_shader_value(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) | ||||
| return GPU_stack_link(mat, "set_value", in, out, vec); | return GPU_stack_link(mat, "set_value", in, out, vec); | ||||
| } | } | ||||
| void register_node_type_sh_value(void) | void register_node_type_sh_value(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, 0); | sh_node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, 0); | ||||
| node_type_compatibility(&ntype, NODE_OLD_SHADING | NODE_NEW_SHADING); | node_type_add_compatibility(&ntype, "CYCLES"); | ||||
| node_type_add_compatibility(&ntype, "BLENDER_RENDER"); | |||||
| node_type_set_category(&ntype, "Input"); | |||||
| node_type_socket_templates(&ntype, NULL, sh_node_value_out); | node_type_socket_templates(&ntype, NULL, sh_node_value_out); | ||||
| node_type_gpu(&ntype, gpu_shader_value); | node_type_gpu(&ntype, gpu_shader_value); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||