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
DefaultInputValues
public Array DefaultInputValues { get; set; }
Property Value
ExpandedOutputPorts
public Array ExpandedOutputPorts { 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
type
VisualShaderNode.PortType
Returns
GetInputPortDefaultValue(int)
Returns the default value of the input port
.
public Variant GetInputPortDefaultValue(int port)
Parameters
port
int
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
method
godot_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
signal
godot_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
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
RemoveInputPortDefaultValue(int)
Removes the default value of the input port
.
public void RemoveInputPortDefaultValue(int port)
Parameters
port
int
SetInputPortDefaultValue(int, Variant, Variant)
Sets the default value
for the selected input port
.
public void SetInputPortDefaultValue(int port, Variant value, Variant prevValue = default)