Shader nodes
95 nodes in 7 categories, for building materials from nodes. To learn how to use them, see Material graphs.
Inputs and outputs have one of four types: float is one number, and vec2, vec3 and vec4 hold two, three and four numbers. A vec3 holds a colour or a direction. If you connect ports of different sizes, this is handled for you where it makes sense.
const
Fixed values you type in.
| Node | What it does | Inputs | Outputs |
|---|---|---|---|
constFloat | A fixed number. | — | out:float |
constVec3 | Three fixed numbers. | — | out:vec3 |
input
Values to start from: texture coordinates (UVs), the surface normal, time, textures, and which copy of an object is being drawn.
| Node | What it does | Inputs | Outputs |
|---|---|---|---|
cameraDistance | How far this pixel is from the camera. Good for fading things out with distance. | — | out:float |
chromaKey — Chroma key | Removes a colour, for example to make a green screen transparent. | color:vec3, key:vec3, similarity:float, smoothness:float, spill:float | rgba:vec4 |
instanceColor — Instance Color | The tint of the copy being drawn. | — | out:vec3 |
instanceId — Instance ID | Which copy of an instanced object is being drawn. Feed it into a hash to make every copy different. | — | out:float |
materialRef — Material | Uses another material as a starting point. | — | out:vec3 |
normal | Which way the surface faces. | — | out:vec3 |
normalMap | Applies a normal map, adding surface detail without more geometry. | uv:vec2, strength:float | out:vec3 |
paramColor — Param (color) | A colour shown as a material setting, so you can change it without editing the graph. | — | out:vec3 |
paramFloat — Param (float) | A number shown as a material setting, so you can change it without editing the graph. | — | out:float |
position | The point on the surface, in the object’s own space. | — | out:vec3 |
sampleLod — Sample Texture LOD | Reads an image at a chosen blur level. A cheap way to soften it. | uv:vec2, lod:float | rgba:vec4 |
screenUv | Where the pixel is on the screen, instead of on the surface. | — | out:vec2 |
texelFetch — Texel Fetch | Reads one exact pixel, without smoothing. | texel:vec2 | rgba:vec4 |
texelSize — Texture Size | The size of one pixel of a texture, for effects that read neighbouring pixels. | — | size:vec2, texel:vec2 |
texture | Reads an image at the given coordinates. | uv:vec2 | rgba:vec4 |
time | Seconds since the scene started. Use it for anything that moves. | — | out:float |
triplanar | Projects a texture from three directions at once, so shapes without texture coordinates, or with stretched ones, still look right. | scale:float, blend:float | rgba:vec4 |
uv | The texture coordinates of the pixel being drawn. Most patterns start here. | — | out:vec2 |
viewDirection | The direction from the surface toward the camera. | — | out:vec3 |
worldPosition | The same point in world space. Use it for effects that stay in place when an object moves. | — | out:vec3 |
light
Lighting that you can shape yourself.
| Node | What it does | Inputs | Outputs |
|---|---|---|---|
fresnel | Stronger at the edges, where the surface turns away. Use it for rim light, force fields or the sheen on a car. | power:float, normal:vec3 | out:float |
lit — Lit (scene lights) | Standard lighting, so a custom graph still fits the scene. | color:vec3, roughness:float, specular:float, normal:vec3 | out:vec3 |
toonLit — Toon (scene lights) | Lighting in bands, for a cartoon look. | color:vec3, steps:float, normal:vec3 | out:vec3 |
math
Maths on single numbers.
| Node | What it does | Inputs | Outputs |
|---|---|---|---|
abs | Removes the minus sign. | x:float | out:float |
add | Adds. | a:float, b:float | out:float |
atan2 | The angle to a point. Use it to build round (radial) patterns. | y:float, x:float | out:float |
ceil | Rounds up. | x:float | out:float |
clamp | Keeps a value inside a range. | x:float, min:float, max:float | out:float |
cos | Cosine. | x:float | out:float |
divide | Divides. | a:float, b:float | out:float |
exp | e to the power of the input. | x:float | out:float |
fbm | Layered noise, for clouds, smoke, rust and terrain. | uv:vec2, scale:float, octaves:float | out:float |
floor | Rounds down. | x:float | out:float |
fract | Keeps only the part after the decimal point. The usual way to make a pattern repeat. | x:float | out:float |
log | Natural logarithm. | x:float | out:float |
max | The larger of two. | a:float, b:float | out:float |
min | The smaller of two. | a:float, b:float | out:float |
mix | Blends between two values. | a:float, b:float, t:float | out:float |
mod | The remainder after division. Another way to make a value wrap around. | x:float, y:float | out:float |
multiply | Multiplies. | a:float, b:float | out:float |
noise | Smooth random values. Start here for anything natural-looking. | uv:vec2, scale:float | out:float |
oneMinus | Turns a 0–1 value around: 0 becomes 1, and 1 becomes 0. | x:float | out:float |
posterize | Snaps values to a set number of levels, for a banded look. | x:float, steps:float | out:float |
pow | Raises to a power. | x:float, e:float | out:float |
remap | Converts a value from one range to another. | x:float, inMin:float, inMax:float, outMin:float, outMax:float | out:float |
round | Rounds to nearest. | x:float | out:float |
sign | Gives −1, 0 or 1. | x:float | out:float |
sin | Sine. Use it for wobbles, pulses and ripples. | x:float | out:float |
smoothstep | A soft edge, with a smooth blend between the two thresholds. One of the most used nodes. | from:float, to:float, x:float | out:float |
sqrt | Square root. | x:float | out:float |
step | A hard edge: 0 below the threshold, 1 above it. | edge:float, x:float | out:float |
subtract | Subtracts. | a:float, b:float | out:float |
tan | Tangent. | x:float | out:float |
voronoi | Cell patterns, for scales, cracked earth and stained glass. | uv:vec2, scale:float | dist:float, cell:float |
output
Where the graph ends: how the surface finally looks.
| Node | What it does | Inputs | Outputs |
|---|---|---|---|
mrtOutput — Output (MRT) | Writes several outputs at once, for advanced setups. | color:vec3, alpha:float, color1:vec3, alpha1:float, color2:vec3, alpha2:float, color3:vec3, alpha3:float | — |
output | Where the graph ends: the finished look of the surface. | color:vec3, alpha:float, offset:vec3 | — |
surfaceOutput — Output (surface) | Describes the surface: base colour, metallic, roughness, normal, emissive and alpha. | baseColor:vec3, metallic:float, roughness:float, emissive:vec3, normal:vec3, alpha:float, offset:vec3, clearcoat:float, clearcoatRoughness:float, ior:float, transmission:float, thickness:float | — |
post
Nodes that read the finished frame. Using one turns the graph into a full-screen effect instead of a surface material.
| Node | What it does | Inputs | Outputs |
|---|---|---|---|
chromaticAberration | Splits the colour channels at the edges, like a real lens. | uv:vec2, amount:float | out:vec3 |
contrast | Makes light parts lighter and dark parts darker. | color:vec3, amount:float | out:vec3 |
exposure | Makes the whole image brighter or darker. | color:vec3, amount:float | out:vec3 |
grain | Adds film grain. | color:vec3, intensity:float | out:vec3 |
invert | Inverts the colours of the image. | color:vec3 | out:vec3 |
saturation | Makes colours stronger or weaker. | color:vec3, amount:float | out:vec3 |
screenColor | The scene as already drawn. Using this node turns the graph into a full-screen effect. | — | out:vec3 |
tint | Shifts the image toward a colour. | color:vec3, tint:vec3 | out:vec3 |
vignette | Darkens the edges of the frame. | color:vec3, offset:float, darkness:float | out:vec3 |
vector
Build, split and change vectors and colours.
| Node | What it does | Inputs | Outputs |
|---|---|---|---|
addVec3 | Adds two three-number vectors. | a:vec3, b:vec3 | out:vec3 |
alpha | Takes out the transparency channel. | v:vec4 | out:float |
combineVec2 | Builds a vector from two numbers. | x:float, y:float | out:vec2 |
combineVec3 | Builds a vector from three numbers. | r:float, g:float, b:float | out:vec3 |
combineVec4 | Builds a vector from four numbers. | rgb:vec3, a:float | out:vec4 |
cross | A direction at right angles to both. | a:vec3, b:vec3 | out:vec3 |
distance | The distance between two points. | a:vec3, b:vec3 | out:float |
dot | Dot product: how closely two directions match. | a:vec3, b:vec3 | out:float |
equirectUv — Equirect UV | Maps a direction onto a panoramic image. | dir:vec3 | uv:vec2 |
flipbook — Flipbook | Plays a grid of frames in one image as an animation. | uv:vec2, frame:float, tilesX:float, tilesY:float | uv:vec2 |
gamma | Applies a gamma curve. | rgb:vec3, gamma:float | out:vec3 |
hsvToRgb | Turns hue, saturation and value back into a colour. | hsv:vec3 | out:vec3 |
hueToRgb | Turns a hue straight into a colour. | h:float | out:vec3 |
length | How long a vector is. | v:vec3 | out:float |
luminance | How bright a colour looks to the eye. | rgb:vec3 | out:float |
mixVec3 | Blends two three-number vectors. | a:vec3, b:vec3, t:float | out:vec3 |
multiplyVec3 | Multiplies two three-number vectors. | a:vec3, b:vec3 | out:vec3 |
normalize | Keeps the direction and sets the length to 1. | v:vec3 | out:vec3 |
panner | Scrolls coordinates over time, for flowing water, conveyor belts or energy beams. | uv:vec2, speed:vec2 | out:vec2 |
reflect | Bounces a direction off a surface. | v:vec3, normal:vec3 | out:vec3 |
rgb | Builds a colour from three numbers. | v:vec4 | out:vec3 |
rgbToHsv | Turns a colour into hue, saturation and value. The easy way to shift hue. | rgb:vec3 | out:vec3 |
scaleVec2 | Multiplies a two-number vector by a number. | v:vec2, s:float | out:vec2 |
scaleVec3 | Multiplies a three-number vector by a number. | v:vec3, s:float | out:vec3 |
splitVec2 | Splits two numbers apart. | v:vec2 | x:float, y:float |
splitVec3 | Splits three numbers apart. | v:vec3 | x:float, y:float, z:float |
uvTransform | Scales, rotates and moves coordinates before reading an image. | uv:vec2, tiling:vec2, offset:vec2, rotation:float, center:vec2 | out:vec2 |