Shader Graph Nodes¶
The visual shader graph editor exposes the same operations as the code-based DSL through a node-and-wire UI. This page is a complete catalog of every available node.
Most arithmetic nodes are polymorphic (AnyFloat): their output width is resolved at compile time from the widest connected input. See Shader and Shader Graph Compiler for details.
Inputs¶
Input nodes carry per-pixel geometry and engine data into the graph. They have no input pins and one output pin.
Node |
Output |
Description |
|---|---|---|
UV |
float2 |
Texture UV coordinates |
World Position |
float3 |
World-space position of the current pixel |
World Normal |
float3 |
World-space surface normal (normalized) |
Local Position |
float3 |
Object-space position of the current pixel |
Local Normal |
float3 |
Object-space surface normal (normalized) |
View Direction |
float3 |
Direction from the pixel toward the camera (world-space, normalized) |
Light Direction |
float3 |
Main directional light — pointing toward the sun, world-space, normalized |
Time |
float |
Global time in seconds since application start ( |
Outputs¶
Connect the computed values to the master output node. All pins are optional; leave unconnected pins at their default values.
PBR Output
The master output for physically-based (lit) shaders.
Pin |
Type |
Default |
Description |
|---|---|---|---|
albedo |
float3 |
(0, 0, 0) |
Base color. Modulated by scene lighting. |
alpha |
float |
1.0 |
Opacity [0, 1] |
alphaCutoff |
float |
0.0 |
Alpha-test threshold. Pixels below are discarded. |
emission |
float3 |
(0, 0, 0) |
Additive glow color. Not affected by lighting. |
emissionStrength |
float |
1.0 |
Multiplier on emission |
metalness |
float |
0.0 |
PBR metalness [0, 1] |
roughness |
float |
1.0 |
PBR roughness [0, 1] |
normalMap |
float3 |
(0, 0, 1) |
Tangent-space normal. Decode from a texture with Unpack Normal. |
ao |
float |
1.0 |
Ambient occlusion [0, 1] |
Unlit Output
Master output for unlit (direct color) shaders.
Pin |
Type |
Default |
Description |
|---|---|---|---|
color |
float3 |
(0, 0, 0) |
Output color |
alpha |
float |
1.0 |
Opacity [0, 1] |
alphaCutoff |
float |
0.0 |
Alpha-test threshold |
Constants¶
Inline constants are embedded directly in the graph and have no input pins. Double-click the node to edit its value.
Node |
Output |
Description |
|---|---|---|
Const |
float |
Inline scalar constant |
Const2 |
float2 |
Inline Float2 constant |
Const3 |
float3 |
Inline Float3 constant |
Const4 |
float4 |
Inline Float4 constant |
Material Variables¶
Variable nodes reference named properties from the material property list. Their value is overridable per mesh instance via the material inspector or from code.
Node |
Output |
Description |
|---|---|---|
Var Float |
float |
Material property of type float |
Var Float2 |
float2 |
Material property of type float2 |
Var Float3 |
float3 |
Material property of type float3 |
Var Float4 |
float4 |
Material property of type float4 |
Var Color |
float3 |
Material property (Float3) shown with a color picker in the inspector |
Var Texture |
Texture2D |
Material property referencing a texture asset |
Texture Sampling¶
Node |
Inputs |
Output |
Description |
|---|---|---|---|
Sample Texture |
texture (Texture2D), uv (float2) |
rgba (float4), rgb (float3) |
Sample a Texture2D at the given UV coordinates |
Noise¶
Node |
Input |
Output |
Description |
|---|---|---|---|
Perlin Noise |
position (float2) |
float |
2D Perlin noise. Output range [0, 1]. |
Perlin Noise 3D |
position (float3) |
float |
3D Perlin noise. Output range [0, 1]. |
Arithmetic (AnyFloat)¶
All nodes below are polymorphic: width is determined at compile time by
the widest connected input. A scalar float broadcasts into any wider type.
Node |
Inputs → Output |
Description |
|---|---|---|
Add |
x, y → result |
x + y (component-wise) |
Subtract |
x, y → result |
x − y (component-wise) |
Multiply |
x, y → result |
x × y (component-wise) |
Divide |
x, y → result |
x / y (component-wise) |
Negate |
x → result |
−x |
Absolute |
x → result |
|x| |
Min |
x, y → result |
Component-wise minimum |
Max |
x, y → result |
Component-wise maximum |
Clamp |
x, lo, hi → result |
Clamp each component to [lo, hi] |
Saturate |
x → result |
Clamp to [0, 1] |
Fractional |
x → result |
Fractional part: x − floor(x) |
Floor |
x → result |
Round down to nearest integer |
Ceil |
x → result |
Round up to nearest integer |
Mul-Add |
a, b, c → result |
a × b + c (compiles to a single fused instruction) |
Lerp |
a, b, t → result |
Linear interpolation: a + t × (b − a). |
Transcendentals (AnyFloat)¶
All component-wise and polymorphic (same width rules as arithmetic).
Node |
Inputs → Output |
Description |
|---|---|---|
Sqrt |
x → result |
Square root |
Power |
x, y → result |
x^y |
Sin |
x → result |
Sine (radians) |
Cos |
x → result |
Cosine (radians) |
Atan2 |
x, y → result |
Arc-tangent of x/y |
Log |
x → result |
Natural logarithm |
Exp |
x → result |
Natural exponentiation: e^x |
Sign |
x → result |
−1, 0, or +1 |
Vector Operations¶
Dimension-specific nodes; not polymorphic.
Node |
Inputs → Output |
Description |
|---|---|---|
Dot Float2 |
x (float2), y (float2) → float |
Dot product |
Dot Float3 |
x (float3), y (float3) → float |
Dot product |
Dot Float4 |
x (float4), y (float4) → float |
Dot product |
Cross |
x (float3), y (float3) → float3 |
Cross product |
Length Float2 |
x (float2) → float |
Vector length |
Length Float3 |
x (float3) → float |
Vector length |
Length Float4 |
x (float4) → float |
Vector length |
Normalize Float2 |
x (float2) → float2 |
Normalize to unit length |
Normalize Float3 |
x (float3) → float3 |
Normalize to unit length |
Normalize Float4 |
x (float4) → float4 |
Normalize to unit length |
Lighting¶
Node |
Inputs → Output |
Description |
|---|---|---|
Fresnel |
power (float), worldNorm (float3), viewDir (float3) → fresnel (float) |
Schlick-style Fresnel edge highlight. Output is near 0 at the surface center, near 1 at glancing angles. Connect the World Normal and View Direction input nodes directly. |
Utility¶
Node |
Inputs → Output |
Description |
|---|---|---|
Remap |
x (AnyFloat), inRange (float2), outRange (float2) → AnyFloat |
Remap x from one range to another |
One Minus |
x → result |
1 − x |
Step |
edge (AnyFloat), x (AnyFloat) → AnyFloat |
0 if x < edge, 1 otherwise |
Smooth Step |
lo (AnyFloat), hi (AnyFloat), x (AnyFloat) → AnyFloat |
Smooth Hermite interpolation between lo and hi |
Tiling Offset |
uv (float2), tiling (float2), offset (float2) → float2 |
Apply tiling and offset to UV: |
Unpack Normal |
sample (float4) → normal (float3) |
Decode a tangent-space normal from an RGB normal-map texture sample |
Channel / Swizzle¶
Extract Channel
Extract a single scalar component from any vector type.
Node |
Inputs → Output |
Description |
|---|---|---|
Extract X |
v (AnyFloat) → float |
Extract the X (or R) channel |
Extract Y |
v (AnyFloat) → float |
Extract the Y (or G) channel |
Extract Z |
v (AnyFloat) → float |
Extract the Z (or B) channel |
Extract W |
v (AnyFloat) → float |
Extract the W (or A) channel |
Combine
Pack scalar or vector components into a wider type.
Node |
Inputs → Output |
Description |
|---|---|---|
Combine Float2 |
x (float), y (float) → float2 |
Pack two scalars into Float2 |
Combine Float3 |
x (float), y (float), z (float) → float3 |
Pack three scalars into Float3 |
Combine Float4 |
x, y, z, w (float) → float4 |
Pack four scalars into Float4 |
Combine Float4 (F2+F2) |
xy (float2), zw (float2) → float4 |
Pack two Float2 values into Float4 |
Combine Float4 (F3+F) |
xyz (float3), w (float) → float4 |
Pack Float3 and a scalar into Float4 |
Swizzle
Rearrange vector components using an editable mask string (e.g. "zyx").
Valid mask characters: x y z w (or r g b a).
Node |
Inputs → Output |
Description |
|---|---|---|
Swizzle → Float2 |
v (AnyFloat) → float2 |
Rearrange 2 components (mask length 2, e.g. |
Swizzle → Float3 |
v (AnyFloat) → float3 |
Rearrange 3 components (mask length 3, e.g. |
Swizzle → Float4 |
v (AnyFloat) → float4 |
Rearrange 4 components (mask length 4, e.g. |