Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_tex_white_noise.c
| Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | static void node_shader_update_tex_white_noise(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| nodeSetSocketAvailability(sockVector, node->custom1 != 1); | nodeSetSocketAvailability(sockVector, node->custom1 != 1); | ||||
| nodeSetSocketAvailability(sockW, node->custom1 == 1 || node->custom1 == 4); | nodeSetSocketAvailability(sockW, node->custom1 == 1 || node->custom1 == 4); | ||||
| } | } | ||||
| void register_node_type_sh_tex_white_noise(void) | void register_node_type_sh_tex_white_noise(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_fn_node_type_base( | sh_node_type_base(&ntype, SH_NODE_TEX_WHITE_NOISE, "White Noise Texture", NODE_CLASS_TEXTURE, 0); | ||||
| &ntype, SH_NODE_TEX_WHITE_NOISE, "White Noise Texture", NODE_CLASS_TEXTURE, 0); | |||||
| node_type_socket_templates(&ntype, sh_node_tex_white_noise_in, sh_node_tex_white_noise_out); | node_type_socket_templates(&ntype, sh_node_tex_white_noise_in, sh_node_tex_white_noise_out); | ||||
| node_type_init(&ntype, node_shader_init_tex_white_noise); | node_type_init(&ntype, node_shader_init_tex_white_noise); | ||||
| node_type_gpu(&ntype, gpu_shader_tex_white_noise); | node_type_gpu(&ntype, gpu_shader_tex_white_noise); | ||||
| node_type_update(&ntype, node_shader_update_tex_white_noise); | node_type_update(&ntype, node_shader_update_tex_white_noise); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||