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 Window → File 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)
StepValue (float)float0 if Value < edge, otherwise 1 (property: edge)
FloorValue (float)floatRounds down. Useful for cells, checkerboards and quantizing
FractValue (float)floatFractional part (repeats 0..1)
AbsValue (float)floatAbsolute value. Mirrors a coordinate around a point

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
Vec3ComposeR, G, B (float)vec3Build a color from three floats
Vec3DecomposeRGB (vec3)R, G, B (float)Split a color into its channels (e.g. chromatic aberration)

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
PixelateUV (vec2)vec2Snaps UV to a grid of cells per unit (pixel-art look)
UV RadialUV (vec2)floatDistance to the center: 0 in the middle, 1 at the middle of each edge

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)
PosterizeColor (vec3)vec3Reduces each channel to levels steps
Scale ColorColor (vec3), Factor (float)vec3Color × Factor (the factor property is used while the input is unconnected)
NoiseUV (vec2)floatValue noise (0..1). scale sets the frequency; Fractal adds 4 octaves
Normal-vec3Surface normal (object shaders only)
Fresnel-float0 facing the camera, 1 at the silhouette; power sharpens it (object shaders only)

Node parameters (colors, values, factors...) are sent to the shader as uniforms and saved in the shader file, so dragging a slider does not recompile the shader. Pins are typed: vec2 (UV), vec3 (color) and float only connect to their own type, an input accepts a single link (a new one replaces the old one) and cycles are rejected. If a graph fails to compile the editor shows the error and post-processing passes the image through.


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

Included examples​

Ready to load from assets/shaders/Examples/.

Post-processing (NodePostprocessing/): Sepia, Duotone, NightVision, Thermal, ChromaticAberration, Underwater, RetroPixels, InkThreshold, DayNightCycle, DamageVignette, GhostEcho, FilmGrain, Ripple, ComicPosterize, MirrorScreen, plus ColorGrading, Contrast, Grayscale, Invert, Passthrough, PulsingTint, Saturation, Tint and Vignette.

Objects (NodeMesh3D/): Hologram, NeonPulse, DiagonalStripes, HitFlash, WaterSurface, Lava, BurnDissolve, RimLight, PixelatedTexture, Checkerboard, NormalColors, ToonOutline, ScanLine, plus DualColorMorph, FireGlow, PulsingColor, PulsingGradient, RainbowCycle, RotatingTexture, ScrollingUV, SolidColor, TextureWithTint, UVGradient, WavyDistortion and ZoomPulse.