diff options
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_tex_noise.cc')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_tex_noise.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc b/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc index 87fb1aeac29..d72e9c3c451 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc +++ b/source/blender/nodes/shader/nodes/node_shader_tex_noise.cc @@ -15,7 +15,7 @@ NODE_STORAGE_FUNCS(NodeTexNoise) static void sh_node_tex_noise_declare(NodeDeclarationBuilder &b) { b.is_function_node(); - b.add_input<decl::Vector>(N_("Vector")).implicit_field(); + b.add_input<decl::Vector>(N_("Vector")).implicit_field(implicit_field_inputs::position); b.add_input<decl::Float>(N_("W")).min(-1000.0f).max(1000.0f).make_available([](bNode &node) { /* Default to 1 instead of 4, because it is much faster. */ node_storage(node).dimensions = 1; @@ -32,12 +32,12 @@ static void sh_node_tex_noise_declare(NodeDeclarationBuilder &b) b.add_output<decl::Color>(N_("Color")).no_muted_links(); } -static void node_shader_buts_tex_noise(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +static void node_shader_buts_tex_noise(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) { uiItemR(layout, ptr, "noise_dimensions", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE); } -static void node_shader_init_tex_noise(bNodeTree *UNUSED(ntree), bNode *node) +static void node_shader_init_tex_noise(bNodeTree * /*ntree*/, bNode *node) { NodeTexNoise *tex = MEM_cnew<NodeTexNoise>(__func__); BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); @@ -59,7 +59,7 @@ static const char *gpu_shader_get_name(const int dimensions) static int node_shader_gpu_tex_noise(GPUMaterial *mat, bNode *node, - bNodeExecData *UNUSED(execdata), + bNodeExecData * /*execdata*/, GPUNodeStack *in, GPUNodeStack *out) { @@ -120,7 +120,7 @@ class NoiseFunction : public fn::MultiFunction { return signature.build(); } - void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override + void call(IndexMask mask, fn::MFParams params, fn::MFContext /*context*/) const override { int param = ELEM(dimensions_, 2, 3, 4) + ELEM(dimensions_, 1, 4); const VArray<float> &scale = params.readonly_single_input<float>(param++, "Scale"); @@ -249,11 +249,11 @@ void register_node_type_sh_tex_noise() sh_fn_node_type_base(&ntype, SH_NODE_TEX_NOISE, "Noise Texture", NODE_CLASS_TEXTURE); ntype.declare = file_ns::sh_node_tex_noise_declare; ntype.draw_buttons = file_ns::node_shader_buts_tex_noise; - node_type_init(&ntype, file_ns::node_shader_init_tex_noise); + ntype.initfunc = file_ns::node_shader_init_tex_noise; node_type_storage( &ntype, "NodeTexNoise", node_free_standard_storage, node_copy_standard_storage); - node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_noise); - node_type_update(&ntype, file_ns::node_shader_update_tex_noise); + ntype.gpu_fn = file_ns::node_shader_gpu_tex_noise; + ntype.updatefunc = file_ns::node_shader_update_tex_noise; ntype.build_multi_function = file_ns::sh_node_noise_build_multi_function; nodeRegisterType(&ntype); |