reckfellENGINE

VisualShaderGroup

A reusable group of VisualShaderNodes similar to a function in programming.

On this page
class VisualShaderGroupReckfellSharpInherits Resource

A reusable group of VisualShaderNodes similar to a function in programming.

A VisualShaderGroup encapsulates a graph of VisualShaderNodes into a reusable component. It defines its own input and output ports, which become the interface when the group is used as a VisualShaderNodeGroup node inside a VisualShader or another VisualShaderGroup. Since an actual shader function is created for each VisualShaderGroup, you can only use global built-in variables. Parameter and Varying related nodes are not allowed. If the group contains nodes that are incompatible with the shader context it is used in (e.g. particle nodes in a spatial shader), the group's outputs will silently fall back to default values.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

VisualShaderGroupConstructor
# VisualShaderGroup
C#
public VisualShaderGroup();

Properties3

GroupNameProperty
# GroupName
C#
public string GroupName { get; set; }

The display name of this group. This name is shown as the caption of the VisualShaderNodeGroup node in the editor.

InputPortCountProperty
# InputPortCount
C#
public int InputPortCount { get; set; }

The number of input ports defined for this group. Shrinking the array removes the trailing ports along with any connections made to them.

OutputPortCountProperty
# OutputPortCount
C#
public int OutputPortCount { get; set; }

The number of output ports defined for this group. Shrinking the array removes the trailing ports along with any connections made to them.

Methods36

AddNodevoid
# AddNode
C#
public void AddNode(VisualShaderNode node, Vector2 position, int id);
Parameters
NameTypeDefault
nodeVisualShaderNode—
positionVector2—
idint—
AttachNodeToFramevoid
# AttachNodeToFrame
C#
public void AttachNodeToFrame(int id, int frame);

Attaches the given node to the given frame.

Parameters
NameTypeDefault
idint—
frameint—
CanConnectNodesbool
# CanConnectNodes
C#
public bool CanConnectNodes(int fromNode, int fromPort, int toNode, int toPort);

Returns true if the specified nodes and ports can be connected.

Parameters
NameTypeDefault
fromNodeint—
fromPortint—
toNodeint—
toPortint—
Returns bool
ConnectNodesError
# ConnectNodes
C#
public Error ConnectNodes(int fromNode, int fromPort, int toNode, int toPort);

Connects the specified nodes and ports.

Parameters
NameTypeDefault
fromNodeint—
fromPortint—
toNodeint—
toPortint—
Returns Error
ConnectNodesForcedvoid
# ConnectNodesForced
C#
public void ConnectNodesForced(int fromNode, int fromPort, int toNode, int toPort);

Connects the specified nodes and ports, even if they can't be connected.

Parameters
NameTypeDefault
fromNodeint—
fromPortint—
toNodeint—
toPortint—
DetachNodeFromFramevoid
# DetachNodeFromFrame
C#
public void DetachNodeFromFrame(int id);

Detaches the given node from the frame it is attached to.

Parameters
NameTypeDefault
idint—
DisconnectNodesvoid
# DisconnectNodes
C#
public void DisconnectNodes(int fromNode, int fromPort, int toNode, int toPort);

Disconnects the specified nodes and ports.

Parameters
NameTypeDefault
fromNodeint—
fromPortint—
toNodeint—
toPortint—
GetGroupNamestring
# GetGroupName
C#
public string GetGroupName();
Returns string
GetInputPortCountint
# GetInputPortCount
C#
public int GetInputPortCount();
Returns int
GetInputPortNamestring
# GetInputPortName
C#
public string GetInputPortName(int id);

Returns the name of the input port at the given id.

Parameters
NameTypeDefault
idint—
Returns string
GetInputPortTypeVisualShaderNode.PortType
# GetInputPortType
C#
public VisualShaderNode.PortType GetInputPortType(int id);

Returns the type of the input port at the given id.

Parameters
NameTypeDefault
idint—
Returns VisualShaderNode.PortType
GetNodeVisualShaderNode
# GetNode
C#
public VisualShaderNode GetNode(int id);
Parameters
NameTypeDefault
idint—
Returns VisualShaderNode
GetNodeConnectionsReckfell.Collections.Array<Reckfell.Collections.Dictionary>
# GetNodeConnections
C#
public Reckfell.Collections.Array<Reckfell.Collections.Dictionary> GetNodeConnections();

Returns the list of connected nodes.

Returns Reckfell.Collections.Array<Reckfell.Collections.Dictionary>
GetNodeListint[]
# GetNodeList
C#
public int[] GetNodeList();

Returns the list of all nodes in the group.

Returns int[]
GetNodePositionVector2
# GetNodePosition
C#
public Vector2 GetNodePosition(int id);

Returns the position of the specified node within the shader graph.

Parameters
NameTypeDefault
idint—
Returns Vector2
GetOutputPortCountint
# GetOutputPortCount
C#
public int GetOutputPortCount();
Returns int
GetOutputPortNamestring
# GetOutputPortName
C#
public string GetOutputPortName(int id);

Returns the name of the output port at the given id.

Parameters
NameTypeDefault
idint—
Returns string
GetOutputPortTypeVisualShaderNode.PortType
# GetOutputPortType
C#
public VisualShaderNode.PortType GetOutputPortType(int id);

Returns the type of the output port at the given id.

Parameters
NameTypeDefault
idint—
Returns VisualShaderNode.PortType
GetValidNodeIdint
# GetValidNodeId
C#
public int GetValidNodeId();

Returns the next valid node ID that can be added to the shader graph.

Returns int
InsertInputPortstring
# InsertInputPort
C#
public string InsertInputPort(int id, VisualShaderNode.PortType type, string name);

Inserts an input port at the given id with the specified type and name. Returns the validated port name, which may differ from name if a port with the same name already exists. Port names must be unique across both input and output ports.

Parameters
NameTypeDefault
idint—
typeVisualShaderNode.PortType—
namestring—
Returns string
InsertOutputPortstring
# InsertOutputPort
C#
public string InsertOutputPort(int id, VisualShaderNode.PortType type, string name);

Inserts an output port at the given id with the specified type and name. Returns the validated port name, which may differ from name if a port with the same name already exists. Port names must be unique across both input and output ports.

Parameters
NameTypeDefault
idint—
typeVisualShaderNode.PortType—
namestring—
Returns string
IsNodeConnectionbool
# IsNodeConnection
C#
public bool IsNodeConnection(int fromNode, int fromPort, int toNode, int toPort);

Returns true if the specified node and port connection exists.

Parameters
NameTypeDefault
fromNodeint—
fromPortint—
toNodeint—
toPortint—
Returns bool
MoveInputPortvoid
# MoveInputPort
C#
public void MoveInputPort(int from, int to);

Moves the input port at index from to index to. Connections from input nodes inside the group will be updated accordingly.

Parameters
NameTypeDefault
fromint—
toint—
MoveOutputPortvoid
# MoveOutputPort
C#
public void MoveOutputPort(int from, int to);

Moves the output port at index from to index to. Connections to output nodes inside the group will be updated accordingly.

Parameters
NameTypeDefault
fromint—
toint—
RemoveInputPortvoid
# RemoveInputPort
C#
public void RemoveInputPort(int id);

Removes the input port at the given id.

Parameters
NameTypeDefault
idint—
RemoveNodevoid
# RemoveNode
C#
public void RemoveNode(int id);

Removes the specified node from the group.

Parameters
NameTypeDefault
idint—
RemoveOutputPortvoid
# RemoveOutputPort
C#
public void RemoveOutputPort(int id);

Removes the output port at the given id.

Parameters
NameTypeDefault
idint—
ReplaceNodevoid
# ReplaceNode
C#
public void ReplaceNode(int id, StringName newClass);

Replaces the specified node with a node of the new class type.

Parameters
NameTypeDefault
idint—
newClassStringName—
SetGroupNamevoid
# SetGroupName
C#
public void SetGroupName(string name);
Parameters
NameTypeDefault
namestring—
SetInputPortCountvoid
# SetInputPortCount
C#
public void SetInputPortCount(int count);
Parameters
NameTypeDefault
countint—
SetInputPortNamevoid
# SetInputPortName
C#
public void SetInputPortName(int id, string name);

Sets the name of the input port at the given id.

Parameters
NameTypeDefault
idint—
namestring—
SetInputPortTypevoid
# SetInputPortType
C#
public void SetInputPortType(int id, VisualShaderNode.PortType type);

Sets the type of the input port at the given id.

Parameters
NameTypeDefault
idint—
typeVisualShaderNode.PortType—
SetNodePositionvoid
# SetNodePosition
C#
public void SetNodePosition(int id, Vector2 position);

Sets the position of the specified node.

Parameters
NameTypeDefault
idint—
positionVector2—
SetOutputPortCountvoid
# SetOutputPortCount
C#
public void SetOutputPortCount(int count);
Parameters
NameTypeDefault
countint—
SetOutputPortNamevoid
# SetOutputPortName
C#
public void SetOutputPortName(int id, string name);

Sets the name of the output port at the given id.

Parameters
NameTypeDefault
idint—
namestring—
SetOutputPortTypevoid
# SetOutputPortType
C#
public void SetOutputPortType(int id, VisualShaderNode.PortType type);

Sets the type of the output port at the given id.

Parameters
NameTypeDefault
idint—
typeVisualShaderNode.PortType—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.