Class VisualShaderNode
- Namespace
- Godot
- Assembly
- GodotSharp.dll
Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node also has connection ports that allow to connect it to another nodes and control the flow of the shader.
public class VisualShaderNode : Resource, IDisposable
- Inheritance
-
VisualShaderNode
- Implements
- Derived
- Inherited Members
Properties
LinkedParentGraphFrame
Represents the index of the frame this node is linked to. If set to -1 the node is not linked to any frame.
public int LinkedParentGraphFrame { get; set; }
Property Value
OutputPortForPreview
Sets the output port index which will be showed for preview. If set to -1 no port will be open for preview.
public int OutputPortForPreview { get; set; }
Property Value
Methods
ClearDefaultInputValues()
Clears the default input ports value.
public void ClearDefaultInputValues()
GetDefaultInputPort(PortType)
Returns the input port which should be connected by default when this node is created as a result of dragging a connection from an existing node to the empty space on the graph.
public int GetDefaultInputPort(VisualShaderNode.PortType type)
Parameters
typeVisualShaderNode.PortType
Returns
GetDefaultInputValues()
Returns an Array containing default values for all of the input ports of the node in the form [index0, value0, index1, value1, ...].
public Array GetDefaultInputValues()
Returns
GetInputPortDefaultValue(int)
Returns the default value of the input port.
public Variant GetInputPortDefaultValue(int port)
Parameters
portint
Returns
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
methodgodot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signalgodot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
methodgodot_string_nameName of the method to invoke.
argsNativeVariantPtrArgsArguments to use with the invoked method.
retgodot_variantValue returned by the invoked method.
Returns
RemoveInputPortDefaultValue(int)
Removes the default value of the input port.
public void RemoveInputPortDefaultValue(int port)
Parameters
portint
SetDefaultInputValues(Array)
Sets the default input ports values using an Array of the form [index0, value0, index1, value1, ...]. For example: [0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)].
public void SetDefaultInputValues(Array values)
Parameters
valuesArray
SetInputPortDefaultValue(int, Variant, Variant)
Sets the default value for the selected input port.
public void SetInputPortDefaultValue(int port, Variant value, Variant prevValue = default)