Skip to main content

Shader node reference

95 nodes across 7 categories, for building materials as graphs. How to use them is in Material graphs.

Port types are float, vec2, vec3 and vec4. A vec3 carries a colour or a direction; connecting mismatched widths is handled for you where it makes sense.

const

Fixed values you type in.

NodeWhat it doesInputsOutputs
constFloatA fixed number.out:float
constVec3A fixed triple.out:vec3

input

Where values come from: UVs, the surface normal, time, textures, the instance being drawn.

NodeWhat it doesInputsOutputs
cameraDistanceHow far this pixel is from the camera. Good for fading things out with distance.out:float
chromaKey — Chroma keyRemoves a colour, turning a green screen transparent.color:vec3, key:vec3, similarity:float, smoothness:float, spill:floatrgba:vec4
instanceColor — Instance ColorThe tint that copy carries.out:vec3
instanceId — Instance IDWhich copy of an instanced object is being drawn — feed it into a hash to make every copy different.out:float
materialRef — MaterialPulls in another material as a starting point.out:vec3
normalWhich way the surface faces.out:vec3
normalMapApplies a normal map, adding surface detail without more geometry.uv:vec2, strength:floatout:vec3
paramColor — Param (color)A colour exposed the same way.out:vec3
paramFloat — Param (float)A number exposed as a material setting, adjustable without editing the graph.out:float
positionThe point on the surface, in the object’s own space.out:vec3
sampleLod — Sample Texture LODSamples at a chosen blur level — cheap softness.uv:vec2, lod:floatrgba:vec4
screenUvWhere the pixel is on screen rather than on the surface.out:vec2
texelFetch — Texel FetchReads one exact pixel, unfiltered.texel:vec2rgba:vec4
texelSize — Texture SizeThe size of one pixel of a texture, for neighbour-sampling effects.size:vec2, texel:vec2
textureSamples an image at some coordinates.uv:vec2rgba:vec4
timeSeconds since the scene started. Anything that moves starts here.out:float
triplanarProjects a texture from three directions at once, so untextured or stretched geometry still looks right.scale:float, blend:floatrgba:vec4
uvThe texture coordinates of the pixel being drawn — the basis of most patterns.out:vec2
viewDirectionThe direction from the surface toward the camera.out:vec3
worldPositionThe same point in world space — use it for effects that stay put as an object moves.out:vec3

light

Lighting terms you can shape yourself.

NodeWhat it doesInputsOutputs
fresnelStronger at glancing angles — rim light, force fields, the sheen on a car.power:float, normal:vec3out:float
lit — Lit (scene lights)Standard lighting, so a custom graph still sits correctly in the scene.color:vec3, roughness:float, specular:float, normal:vec3out:vec3
toonLit — Toon (scene lights)Banded lighting for a stylised look.color:vec3, steps:float, normal:vec3out:vec3

math

Arithmetic and curves on single numbers.

NodeWhat it doesInputsOutputs
absDrops the sign.x:floatout:float
addAdds.a:float, b:floatout:float
atan2The angle to a point — how you build radial patterns.y:float, x:floatout:float
ceilRounds up.x:floatout:float
clampKeeps a value inside a range.x:float, min:float, max:floatout:float
cosCosine.x:floatout:float
divideDivides.a:float, b:floatout:float
expe to the power of the input.x:floatout:float
fbmLayered noise — clouds, smoke, rust, terrain.uv:vec2, scale:float, octaves:floatout:float
floorRounds down.x:floatout:float
fractJust the fractional part — the standard way to make anything repeat.x:floatout:float
logNatural logarithm.x:floatout:float
maxThe larger of two.a:float, b:floatout:float
minThe smaller of two.a:float, b:floatout:float
mixBlends between two values.a:float, b:float, t:floatout:float
modThe remainder; the other way to wrap a value.x:float, y:floatout:float
multiplyMultiplies.a:float, b:floatout:float
noiseSmooth random values. The starting point for anything organic.uv:vec2, scale:floatout:float
oneMinusFlips a 0–1 value round. Deceptively useful.x:floatout:float
posterizeSnaps values to a number of steps — banding, on purpose.x:float, steps:floatout:float
powRaises to a power.x:float, e:floatout:float
remapRescales from one range to another.x:float, inMin:float, inMax:float, outMin:float, outMax:floatout:float
roundRounds to nearest.x:floatout:float
signGives −1, 0 or 1.x:floatout:float
sinSine — every wobble, pulse and ripple starts with this.x:floatout:float
smoothstepA soft edge, with a gradient between the two thresholds. The workhorse of shader graphs.from:float, to:float, x:floatout:float
sqrtSquare root.x:floatout:float
stepA hard edge: below the threshold 0, above it 1.edge:float, x:floatout:float
subtractSubtracts.a:float, b:floatout:float
tanTangent.x:floatout:float
voronoiCellular patterns: scales, cracked earth, stained glass.uv:vec2, scale:floatdist:float, cell:float

output

Where the graph ends: what the surface actually looks like.

NodeWhat it doesInputsOutputs
mrtOutput — Output (MRT)Writes several outputs at once, for advanced pipelines.color:vec3, alpha:float, color1:vec3, alpha1:float, color2:vec3, alpha2:float, color3:vec3, alpha3:float
outputWhere the graph ends: the finished look of the surface.color:vec3, alpha:float, offset:vec3
surfaceOutput — Output (surface)The physical description — base colour, metallic, roughness, normal, emissive, 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 sample the rendered frame — these make the graph a full-screen effect rather than a surface.

NodeWhat it doesInputsOutputs
chromaticAberrationSplits colour channels at the edges, like a real lens.uv:vec2, amount:floatout:vec3
contrastPushes light and dark apart.color:vec3, amount:floatout:vec3
exposureBrightens or darkens the whole image.color:vec3, amount:floatout:vec3
grainAdds film grain.color:vec3, intensity:floatout:vec3
invertInverts it.color:vec3out:vec3
saturationMore or less colourful.color:vec3, amount:floatout:vec3
screenColorThe scene as already rendered. Using this makes the graph a full-screen effect.out:vec3
tintPushes the image toward a colour.color:vec3, tint:vec3out:vec3
vignetteDarkens the edges of the frame.color:vec3, offset:float, darkness:floatout:vec3

vector

Building, splitting and transforming vectors and colours.

NodeWhat it doesInputsOutputs
addVec3Adds two triples.a:vec3, b:vec3out:vec3
alphaPulls the transparency channel out.v:vec4out:float
combineVec2Builds a pair.x:float, y:floatout:vec2
combineVec3Builds a triple.r:float, g:float, b:floatout:vec3
combineVec4Builds a quad.rgb:vec3, a:floatout:vec4
crossA direction perpendicular to both.a:vec3, b:vec3out:vec3
distanceDistance between two points.a:vec3, b:vec3out:float
dotDot product — how much two directions agree.a:vec3, b:vec3out:float
equirectUv — Equirect UVMaps a direction onto a panoramic image.dir:vec3uv:vec2
flipbook — FlipbookPlays a grid of frames in one image as an animation.uv:vec2, frame:float, tilesX:float, tilesY:floatuv:vec2
gammaApplies a gamma curve.rgb:vec3, gamma:floatout:vec3
hsvToRgbAnd back again.hsv:vec3out:vec3
hueToRgbA hue straight to a colour.h:floatout:vec3
lengthHow long a vector is.v:vec3out:float
luminanceHow bright a colour reads to the eye.rgb:vec3out:float
mixVec3Blends two triples.a:vec3, b:vec3, t:floatout:vec3
multiplyVec3Multiplies two triples.a:vec3, b:vec3out:vec3
normalizeSame direction, length 1.v:vec3out:vec3
pannerScrolls coordinates over time — flowing water, conveyor belts, energy beams.uv:vec2, speed:vec2out:vec2
reflectBounces a direction off a surface.v:vec3, normal:vec3out:vec3
rgbBuilds a colour from three numbers.v:vec4out:vec3
rgbToHsvColour to hue, saturation and value — the easy way to shift hue.rgb:vec3out:vec3
scaleVec2Scales a pair by a number.v:vec2, s:floatout:vec2
scaleVec3Scales a triple by a number.v:vec3, s:floatout:vec3
splitVec2Takes a pair apart.v:vec2x:float, y:float
splitVec3Takes a triple apart.v:vec3x:float, y:float, z:float
uvTransformScales, rotates and offsets coordinates before sampling.uv:vec2, tiling:vec2, offset:vec2, rotation:float, center:vec2out:vec2