Skip to main content
Version: 5.x

Nodes > Functions > Util > Custom Code

Custom Code

The Code Node allows custom GLSL shader functions to be written directly in the graph system. Code Nodes are powerful tools with many features, so be sure to check out the Code Node Guide for more information.

For quick reference on all the built-in operations available, select one of the code snippets from the Example Code dropdown.

To see more examples, check out the Code Node Template.

Inputs

NameTypeDescription
Value 1floatUser-defined inputs appear on the left. This is the first input for the default example that appears when a Code Node is created
Value 2floatUser-defined inputs appear on the left. This is the second input for the default example that appears when a Code Node is created

Outputs

NameTypeDescription
ResultfloatUser-defined outputs appear on the right. This is the output for the default example that appears when a Code Node is created.

Properties

NameTypeDescription
TitlestringThe title of your function. The title appears at the top of the Code Node and is used by the Custom Code Global node to select Global variables
VersionstringThe version of your custom function, useful to help keep track of code variants you create. The default value is 0.1.0
StagedropdownFor Code Nodes that are attached to Output containers in a VFX system, selects whether the Code Node is operating in the Vertex or Pixel shader
DescriptiontextOptional description text to explain the Code Node’s function
ErrorstextErrors in your code will appear in this window
Example CodedropdownLoad a premade code snippet, useful for quick reference of built-in functions. Selecting a code snippet will replace all the code in the code window.
HeightintThe height of the code window, in pixels
CodetextCustom shader functions are written here, and is where input and output ports and global variables are defined.
Was this page helpful?
Yes
No