Skip to main content

Shader Node Editor


The Node Editor provides a visual way to create shaders without writing GLSL code. Connect nodes to build complex effects intuitively.

Getting Started


  1. Open WindowFile Browser
  2. Navigate to the Shaders section
  3. Create a new shader or select an existing one
  4. Choose Node-based as the shader type
  5. The Node Editor will open automatically

Node Editor Interface


ElementDescription
CanvasThe main area where you place and connect nodes
Context MenuRight-click to add new nodes
NodeA processing unit with inputs and outputs
PinConnection point on a node (input on left, output on right)
LinkA connection between two pins
  • Pan: Middle mouse button + drag, or hold Space + left mouse drag
  • Zoom: Mouse scroll wheel
  • Select: Left-click on a node
  • Multi-select: Ctrl + left-click, or drag a selection box
  • Delete: Select node/link and press Delete

Data Types


Nodes use different data types for their pins:

TypeColorDescription
floatGraySingle value (e.g., time, intensity)
vec2GreenTwo values (e.g., UV coordinates)
vec3BlueThree values (e.g., RGB color, position)
note

You can only connect pins of compatible types. The editor will reject incompatible connections.

Node Reference


Input Nodes

These nodes provide data to your shader.

NodeOutput TypeDescription
TimefloatCurrent time in seconds (for animations)
Float ValuefloatA constant float value you can configure
UV Coordsvec2Texture coordinates of the current fragment
Colorvec3A constant RGB color you can configure

Time Node

Outputs the elapsed time, useful for animated effects.

[Time] ─→ float (continuously increasing value)

Float Value Node

Outputs a configurable constant value.

[Float Value] ─→ float (user-defined constant)
  • Properties: value - The float value to output

UV Coords Node

Outputs the UV texture coordinates.

[UV Coords] ─→ vec2 (x: 0-1, y: 0-1)

Color Node

Outputs a configurable RGB color.

[Color] ─→ vec3 (RGB values 0-1)
  • Properties: Click to open color picker

Texture Nodes

NodeInputOutputDescription
ImageUV (vec2)Color (vec3), Alpha (float)Sample an external image texture
Mesh TextureUV (vec2)Color (vec3), Alpha (float)Sample the object's diffuse texture
Internal TextureUV (vec2)Color (vec3), Alpha (float)Sample the scene render (postprocessing)

Mesh Texture Node

Samples the texture assigned to the current mesh. Essential for object shaders.

UV (vec2) ─→ [Mesh Texture] ─→ Color (vec3)
─→ Alpha (float)

Math Nodes (Float)

Operations on single float values.

NodeInputsOutputOperation
AddFloatA, B (float)floatA + B
SubtractFloatA, B (float)floatA - B
MultiplyFloatA, B (float)floatA × B
SinInput (float)floatsin(Input)
CosInput (float)floatcos(Input)
SmoothstepValue (float)floatsmoothstep(edge0, edge1, Value)

Sin / Cos Nodes

Generate wave patterns. Perfect for pulsing effects.

Time ─→ [Sin] ─→ float (-1 to 1)

Smoothstep Node

Smooth interpolation between 0 and 1.

  • Properties: edge0, edge1 - The interpolation range

Math Nodes (Vec3)

Operations on color/vector values.

NodeInputsOutputOperation
AddA, B (vec3)vec3A + B
SubtractA, B (vec3)vec3A - B
MultiplyA, B (vec3)vec3A × B (component-wise)
MixA, B (vec3), Factor (float)vec3mix(A, B, Factor)

Mix Node

Blends between two colors based on a factor (0 = A, 1 = B).

Color A (vec3) ─→ [Mix] ─→ Result (vec3)
Color B (vec3) ─→
Factor (float) ─→

Converter Nodes

NodeInputsOutputsDescription
Vec2ComposeX, Y (float)Vec2Combine two floats into vec2
Vec2DecomposeVec2X, Y (float)Split vec2 into two floats

UV Manipulation Nodes

NodeInputsOutputDescription
UV OffsetUV, Offset (vec2)vec2Shifts UV coordinates
UV ScaleUV, Scale (vec2)vec2Scales UV coordinates
UV RotateUV (vec2), Angle (float)vec2Rotates UV around center

UV Offset Example

Create a scrolling texture effect:

[UV Coords] ─────────────────────→ [UV Offset] ─→ [Mesh Texture]
[Time] ─→ [MultiplyFloat] ─→ [Vec2Compose] ─→

Effect Nodes

NodeInputsOutputDescription
GradientUV (vec2)vec3Creates a gradient from UV coordinates
GrayscaleColor (vec3)floatConverts color to grayscale value
InvertColor (vec3)vec3Inverts colors (1 - color)
ContrastColor (vec3)vec3Adjusts color contrast
SaturationColor (vec3)vec3Adjusts color saturation
VignetteUV (vec2)floatCreates vignette mask (dark edges)

Output Node

Every shader must have exactly one Output node.

NodeInputDescription
OutputColor (vec3)Final color sent to the screen

Common Patterns


Pulsing Color

[Time] ─→ [Sin] ─→ [Smoothstep] ─→ Factor
[Color A] ─→ [Mix] ─→ [Output]
[Color B] ─→

Scrolling Texture

[UV Coords] ─→ UV ─→ [UV Offset] ─→ [Mesh Texture] ─→ [Output]
[Time] ─→ [MultiplyFloat] ─→ X ─→ [Vec2Compose] ─→ Offset
[Float: 0.1] ─→ B Y ─→

Wavy Distortion

[Time] ─→ [Sin] ─→ [MultiplyFloat] ─→ X ─→ [Vec2Compose] ─→ [UV Offset]
[Time] ─→ [Cos] ─→ [MultiplyFloat] ─→ Y ─→
[Float: 0.02] ─→

Color Tint

[Mesh Texture] ─→ [Multiply] ─→ [Output]
[Color: Orange] ─→

Troubleshooting


IssueSolution
Shader shows magentaOutput node is not connected
No visible effectCheck that all required inputs are connected
Texture appears blackEnsure UV Coords are connected to texture input
Animation not workingVerify Time node is connected somewhere in the graph

Performance Tips


  1. Minimize texture samples: Each texture lookup has a cost
  2. Reuse calculations: Connect one node's output to multiple inputs
  3. Use simple math: Sin/Cos are more expensive than Add/Multiply
  4. Test on target hardware: Complex shaders may affect performance on older GPUs