From e93159960ab2567845f7ba87a0dd5c87f2c4c4e5 Mon Sep 17 00:00:00 2001 From: Beuc Date: Tue, 13 Oct 2020 18:11:50 +0200 Subject: [PATCH] Make PerlinNoise3D accept scalars directly The current code requires creating and plugging a Scalar node just to enter the value "10" (see current screenshot); with this change, the node, like existing Godot nodes, can take the scalar value directly within the PerlinNoise3D Node. --- tutorials/plugins/editor/visual_shader_plugins.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tutorials/plugins/editor/visual_shader_plugins.rst b/tutorials/plugins/editor/visual_shader_plugins.rst index a0403c4fd..96928a4f2 100644 --- a/tutorials/plugins/editor/visual_shader_plugins.rst +++ b/tutorials/plugins/editor/visual_shader_plugins.rst @@ -50,6 +50,10 @@ all you need to initialize your plugin. return "Classic Perlin-Noise-3D function (by Curly-Brace)" + func _init(): + set_input_port_default_value(2, 0.0) + + func _get_return_icon_type(): return VisualShaderNode.PORT_TYPE_SCALAR