DreamShaderLang
Builtins

UE.* Nodes

The registered UE.* builtins, their arguments, output widths and the Properties declaration form.

The UE. namespace is how DreamShaderLang creates Unreal material nodes. Twenty-seven names in it are registered builtins: DreamShader implements each one itself, mapping it to a single UMaterialExpression class with a fixed argument set. Three more names — UE.StaticSwitchParameter, UE.CollectionParam and UE.SceneTexture — are special-cased ahead of that table.

Everything else in the namespace falls through to the generic reflected path, UE.Expression, where UE.<Name> simply means "create UMaterialExpression<Name>". A name that is not on this page is therefore not an error — it is a different code path with different rules.

Both the namespace prefix and the builtin name are matched case-insensitively: ue.texcoord() is UE.TexCoord(). Argument names are matched case-insensitively after trimming, but are otherwise exact — Un_Mirror_U is not UnMirrorU.

Two rules to read before the catalogue

Registered builtins never validate their argument list. Each one reads only the argument names listed in its entry below and drops everything else — unknown names, misspellings and positional arguments alike — with no diagnostic.

UE.TexCoord(Indx = 3) silently produces UV channel 0. UE.Panner(SpedX = 1) silently pans at the node default speed. UE.TexCoord(0) compiles and gives channel 0 because the positional argument is dropped and the node default happens to be 0 — the right answer by accident, not by design.

If an argument appears to have no effect, check its spelling against the entry. The only registered builtins that read a positional argument at all are UE.TransformVector and UE.TransformPosition (index 0 is Input) and UE.StaticSwitchParameter (indices 0 and 1 are True and False).

A registered builtin creates a fresh node on every call. These builtins consult no reuse cache, and neither do UE.StaticSwitchParameter and UE.CollectionParam. Writing UE.TexCoord(Index = 0) in five places produces five TextureCoordinate nodes.

Only the generic UE.Expression path, the Substrate.* wrappers and the math builtins deduplicate identical calls. UE.SceneTexture desugars to a generic call, so it does take part.

Assign the call to a Graph variable once and reuse the variable when you want one node.

Synopsis

NotationMeaningExample
<x>Placeholder — substitute a real value; the angle brackets are not typed.Name = <string>
[ x ]Optional — the whole group may be left out.[, Root = <string>]
{ a | b }Choice — take exactly one of the alternatives separated by |.{ Node( … ) | Comment( … ) }
Repetition — the preceding item may appear any number of times.<property-declaration> …
// expression form, inside Graph
UE.<Name> ( [ <argument> [ , <argument> ] … ] )

<argument> := <arg-name> = <expression>

// declaration form, inside Properties
UE.<Name> [ ( <key> = <value> [ , <key> = <value> ] … ) ] <property-name> ;

The roster

All 27 registered builtins, in registration order. Class names are written without their UMaterialExpression prefix.

BuiltinUMaterialExpression classOutputArguments
UE.TexCoordTextureCoordinatefloat2Index, UTiling, VTiling, UnMirrorU, UnMirrorV
UE.TimeTimefloat1Period, IgnorePause
UE.PannerPannerfloat2Coordinate, Time, Speed, SpeedX, SpeedY, FractionalPart
UE.WorldPositionWorldPositionfloat3none
UE.ObjectPositionWSObjectPositionWSfloat3none
UE.CameraVectorWSCameraVectorWSfloat3none
UE.VertexNormalWSVertexNormalWSfloat3none
UE.VertexTangentWSVertexTangentWSfloat3none
UE.ScreenPositionScreenPositionfloat2none
UE.VertexColorVertexColorfloat4none
UE.PixelDepthPixelDepthfloat1none
UE.SceneDepthSceneDepthfloat1none
UE.SceneColorSceneColorfloat4none
UE.TranslatedWorldPositionWorldPosition, camera-relativefloat3none
UE.ObjectPositionObjectPositionWSfloat3none
UE.ObjectRadiusObjectRadiusfloat1none
UE.ObjectBoundsObjectBoundsfloat3none
UE.CameraVectorCameraVectorWSfloat3none
UE.CameraPositionCameraPositionWSfloat3none
UE.ReflectionVectorReflectionVectorWSfloat3none
UE.PixelNormalWSPixelNormalWSfloat3none
UE.TwoSidedSignTwoSidedSignfloat1none
UE.PerInstanceRandomPerInstanceRandomfloat1none
UE.PerInstanceFadeAmountPerInstanceFadeAmountfloat1none
UE.ViewportUVScreenPositionfloat2none
UE.TransformVectorTransformfloat3Input, Source, Destination
UE.TransformPositionTransformPositionfloat3Input, Source, Destination, PeriodicWorldTileSize, FirstPersonInterpolationAlpha

Every width above is authoritative, which makes any registered builtin a valid widening partner in a mixed-width binary operator. See Expressions and conversions. None of these builtins produces a texture object, a MaterialAttributes value or a Substrate value.

Four builtins are registered conditionally. UE.ObjectPositionWS, UE.ObjectPosition, UE.ScreenPosition and UE.ViewportUV are added to the table only when their engine class resolves on the running editor — directly on UE 5.5+ for object position and UE 5.6+ for screen position, and below those versions by a name lookup of /Script/Engine.MaterialExpressionObjectPositionWS and /Script/Engine.MaterialExpressionScreenPosition.

If the lookup fails the builtin is not registered at all, and the call falls through to the generic path, where it fails with Unsupported UE builtin call '{Name}' in Graph. … unless you supply an OutputType.

Aliases

Four names in the roster are second spellings of an entry that is already there. Both spellings create the same node class.

AliasSame asDifference
UE.ObjectPositionUE.ObjectPositionWSnone
UE.CameraVectorUE.CameraVectorWSnone
UE.ViewportUVUE.ScreenPositionnone — the engine has no dedicated ViewportUV class; both read output 0 of ScreenPosition, which is the viewport UV
UE.TranslatedWorldPositionUE.WorldPositionthe camera-relative shader-offset mode is forced on, instead of the node's default absolute mode

Builtins that take arguments

UE.TexCoord

float2 uv    = UE.TexCoord(Index = 0);
float2 tiled = UE.TexCoord(Index = 0, UTiling = 2.0, VTiling = 2.0);
ArgumentKindDefaultRequired
Indexinteger literalnode default, UV channel 0no
UTilingnumeric literalnode defaultno
VTilingnumeric literalnode defaultno
UnMirrorUboolean literalnode defaultno
UnMirrorVboolean literalnode defaultno

CoordinateIndex is not an accepted spelling here — it is accepted only by the declaration form. A negative Index is accepted without a diagnostic in the expression form.

UE.Time

float t      = UE.Time();
float looped = UE.Time(Period = 2.0, IgnorePause = true);
ArgumentKindDefaultRequired
Periodnumeric literalabsent — the node's period override stays offno
IgnorePauseboolean literalnode defaultno

Supplying Period also turns the node's period override on. No range check is applied in a Graph: a negative Period is written through unchanged. The declaration form rejects it.

UE.Panner

float2 panned = UE.Panner(Coordinate = UE.TexCoord(Index = 0),
                          Time       = UE.Time(),
                          SpeedX     = 0.1,
                          SpeedY     = 0.0);
ArgumentKindDefaultRequired
Coordinateinput pinunconnectedno
Timeinput pinunconnectedno
Speedinput pinunconnectedno
SpeedXnumeric literalnode defaultno
SpeedYnumeric literalnode defaultno
FractionalPartboolean literalnode defaultno

ConstCoordinate is not accepted in the expression form. The declaration form accepts it, and the generic path can reach it as UE.Expression(Class = "Panner", OutputType = "float2", ConstCoordinate = 1).

UE.TransformVector

Transforms a direction between bases. Rotation only — translation is not applied, which is what makes it the wrong choice for a point.

vec3 worldNormal = UE.TransformVector(LocalNormal, Source = "Tangent", Destination = "World");
ArgumentKindDefaultRequired
Inputinput pin; may also be given positionally at index 0yes
Sourcetext literal"Tangent"no
Destinationtext literal"World"no

Both basis arguments accept the same nine spellings, resolving to six engine values. Every spelling works on UE 5.3 – 5.8, and no spelling is accepted by one side and rejected by the other.

SpellingBasis
Tangenttangent space
Locallocal space
Worldabsolute world space
AbsoluteWorldabsolute world space — an alias of World, not a distinct basis
Viewview space
Cameracamera space
Instanceinstance / particle space
Particleinstance / particle space
InstanceParticleinstance / particle space

Basis names are matched case-insensitively after trimming, so "world", "World" and " WORLD " are one token. Spaces, underscores and hyphens are not stripped: "absolute world" and "absolute_world" do not resolve — write "AbsoluteWorld". A quoted string and a bare identifier are equivalent, so Source = World and Source = "World" are the same.

Either token failing to resolve produces the single message UE.TransformVector Source/Destination is invalid. — it does not say which one.

UE.TransformPosition

Transforms a point between bases, applying translation.

vec3 viewP = UE.TransformPosition(UE.WorldPosition(),
                                  Source      = "World",
                                  Destination = "TranslatedWorld");
ArgumentKindDefaultRequired
Inputinput pin; may also be given positionally at index 0yes
Sourcetext literal"Local"no
Destinationtext literal"World"no
PeriodicWorldTileSize since UE 5.5input pinunconnectedno
FirstPersonInterpolationAlpha since UE 5.6input pinunconnectedno

Note that the default Source differs from UE.TransformVector: it is "Local" here and "Tangent" there.

One resolver serves both Source and Destination, so the accepted set is identical for the two arguments. Thirteen spellings resolve to eight engine values.

SpellingBasisRequires
Locallocal space
Worldabsolute world space
AbsoluteWorldabsolute world space
PeriodicWorldperiodic world spacesince UE 5.5
TranslatedWorldcamera-relative world space
CameraRelativeWorldcamera-relative world space
FirstPersonfirst-person translated world spacesince UE 5.6
FirstPersonTranslatedWorldfirst-person translated world spacesince UE 5.6
Viewview space
Cameracamera space
Instanceinstance / particle space
Particleinstance / particle space
InstanceParticleinstance / particle space

A version-gated spelling below its gate is reported as an invalid basis, not as a version error. On UE 5.3 or 5.4, UE.TransformPosition(P, Destination = "PeriodicWorld") fails with UE.TransformPosition Source/Destination is invalid. — the same message a typo produces.

The two version-gated inputs also disagree with each other. Below UE 5.5, PeriodicWorldTileSize is silently dropped: not applied, not validated, not diagnosed. Below UE 5.6, FirstPersonInterpolationAlpha is a hard error (UE.TransformPosition FirstPersonInterpolationAlpha requires Unreal Engine 5.6 or newer.).

To keep a source file portable across 5.3 – 5.8, guard the value on the authoring side rather than relying on the argument being rejected.

Builtins that take no arguments

Twenty-two of the twenty-seven take nothing at all. Each creates its node with every input pin left unconnected.

Position and geometry

CallOutputNotes
UE.WorldPosition()float3absolute world position; the node's shader-offset mode is left at its default
UE.TranslatedWorldPosition()float3the same node with the camera-relative mode forced on; equivalent to GetTranslatedWorldPosition(Parameters) in HLSL
UE.ObjectPositionWS()float3conditionally registered
UE.ObjectPosition()float3alias of UE.ObjectPositionWS, conditionally registered on the same terms
UE.ObjectRadius()float1
UE.ObjectBounds()float3
UE.CameraPosition()float3CameraPositionWS

For the other shader-offset modes of WorldPosition, use the generic path: UE.Expression(Class = "WorldPosition", OutputType = "float3", WorldPositionShaderOffset = …).

Vectors and normals

CallOutputNotes
UE.CameraVectorWS()float3
UE.CameraVector()float3alias of UE.CameraVectorWS
UE.VertexNormalWS()float3
UE.VertexTangentWS()float3
UE.PixelNormalWS()float3
UE.ReflectionVector()float3ReflectionVectorWS
UE.TwoSidedSign()float1

Screen and scene

CallOutputNotes
UE.ScreenPosition()float2conditionally registered; output 0 of the node is the viewport UV
UE.ViewportUV()float2alias of UE.ScreenPosition, reading the same output
UE.PixelDepth()float1a scene read for the current pixel; no UV or offset input is wired
UE.SceneDepth()float1the node's UV input is left unconnected
UE.SceneColor()float4

To wire a UV into a scene depth read, use the generic path: UE.Expression(Class = "SceneDepth", OutputType = "float1", Input = <uv>).

The two surfaces disagree about ScreenPosition. In a Graph the result is 2 components; as a property declaration the parser declares 4. Nothing reconciles them — write the Graph form when the width matters.

Per-vertex and per-instance data

CallOutput
UE.VertexColor()float4
UE.PerInstanceRandom()float1
UE.PerInstanceFadeAmount()float1

Special-cased builtins

These three names are resolved before the registered table and do not follow its rules.

UE.StaticSwitchParameter

since 1.2.3

Creates a static switch that shows up in the material instance editor, so an artist can flip a branch without touching the source.

vec3 color = UE.StaticSwitchParameter(Name        = "UseDetail",
                                      True        = detailColor,
                                      False       = baseColor,
                                      Default     = true,
                                      Group       = "Switches",
                                      Description = "Choose the detail branch");
ArgumentAliasesKindDefaultRequired
NameParameterNametext literal, non-blank after trimmingyes
TrueA, positional index 0valueyes
FalseB, positional index 1valueyes
DefaultDefaultValueboolean literalfalseno
Grouptext literalnoneno
Descriptiontext literalnoneno
SortPriorityinteger literalnode defaultno

The output takes its component count and its MaterialAttributes flag from the True branch. Both branches must agree: neither may be a texture object or a Substrate value, they may not mix MaterialAttributes with numeric values, and their component counts must be equal.

The parameter is registered on the generated material with an editor-only static-switch value. Inside a material function nothing is registered. A node already registered under the same property name is reused rather than duplicated.

Group and Description are read with the tolerant text handler: if the value is not a text literal, the argument is discarded without a diagnostic. SortPriority and Default do report a malformed value.

UE.CollectionParam

since 1.2.3

Reads a scalar or vector parameter out of a UMaterialParameterCollection. UE.CollectionParameter is an accepted second spelling.

float wind = UE.CollectionParam(Collection = Path(Game, "Collections/MPC_Wind"),
                                Parameter  = "WindStrength");
ArgumentAliasesKindDefaultRequired
CollectionAssetPath(…) call or an Unreal object pathyes
ParameterParameterNametext literal, non-blankyes
Group since UE 5.7text literalnoneno
SortPriority since UE 5.7integer literalnode defaultno
Descriptiontext literalnoneno

The collection is loaded at generation time and the parameter is looked up by name in it. The output width follows what it finds:

Parameter kind found in the collectionOutput
vectorfloat4
scalarfloat1
neithererror

Below UE 5.7, Group and SortPriority are silently dropped. SortPriority is still parsed and still reports a non-integer value on every engine version — it simply has no effect. The node's ExpressionGUID is likewise only seeded on UE 5.7+. Description is written on every version.

Unlike every builtin in the roster, this one's output width is not marked authoritative — and neither is UE.StaticSwitchParameter's. Neither can act as the widening partner in a mixed-width binary operator.

UE.CollectionParam is also the only builtin placed at a negative canvas X (-520); the rest of the registered builtins land at 520 and the declaration form at -800.

For Path(…) grammar and its accepted roots, see Asset references.

UE.SceneTexture

Pure sugar, resolved before every other UE. name.

float4 scene = UE.SceneTexture(Id = "PostProcessInput0");
ArgumentKindDefaultRequired
Idtext literalyes

It rewrites the call to

UE.Expression(Class = "SceneTexture", OutputType = "float4", SceneTextureId = <Id>)

and evaluates that, so the node is UMaterialExpressionSceneTexture with a float4 output and every generic-path rule applies from there — including node reuse.

The call must have exactly one argument and it must be named Id; anything else fails with UE.SceneTexture expects exactly Id="..." (e.g. Id="PostProcessInput0").

The Id text goes through the reflected enum writer, which accepts the entry name with or without its enum prefix, the fully qualified name, and the display name — ignoring case and ignoring the space, _, -, :, . and / characters. All of "PostProcessInput0", "PPI_PostProcessInput0" and "ppi postprocessinput0" select the same value.

Properties declaration form

UE.<Name>(…) may also stand where a type token would, inside a Properties section. The node is created once at generation time and bound to a property name the Graph then reads.

Properties {
    UE.TexCoord(Index = 0) UV;
    UE.CollectionParam(Collection = Path(Game, "MPC_Weather"), Parameter = "Wind") Wind;
}

Graph {
    Color = vec3(UV.x, UV.y, Wind);
}

This is a separate implementation with a smaller catalogue and different rules. Do not carry a rule across from the expression form.

RuleDeclaration formExpression form
Argument syntaxKey=Value text pairs; values unquoted and trimmed, keys lower-casedfull expressions, including nested calls
Unknown argument nameerrorsilently ignored
Duplicate argument nameerrorlast one wins
Positional argumentsnot expressibleaccepted by three builtins
Argument orderlost — arguments are stored in a mappreserved
Inline default (= …)errornot applicable
Node canvas X-800520, or -520 for UE.CollectionParam
Output widthfrom the parser's own table, or OutputTypefrom the node

Inline defaults are the mistake to watch for. Put arguments inside the parentheses:

// correct
UE.TexCoord(Index = 0) UV;

// error: UE builtin property 'UV' does not support inline defaults.
UE.TexCoord UV = 0;

Recognized names

An argument outside its row is rejected with UE.{Name} for property '{Property}' does not support argument '{Argument}'.

UE.NameNode classAccepted argumentsDifferences from the expression form
TexCoordTextureCoordinateIndex, CoordinateIndex, UTiling, VTiling, UnMirrorU, UnMirrorVCoordinateIndex is accepted; supplying both spellings is an error; a negative index is an error
TimeTimePeriod, IgnorePausePeriod must be ≥ 0
PannerPannerCoordinate, Time, Speed, SpeedX, SpeedY, ConstCoordinate, FractionalPartConstCoordinate is accepted; Coordinate takes either an integer, written to ConstCoordinate, or a property reference
WorldPositionWorldPositionShaderOffsetsShaderOffsets is accepted
ObjectPositionWSObjectPositionWSOriginOrigin is accepted
CameraVectorWSCameraVectorWSnoneany argument is an error rather than ignored
ScreenPositionScreenPositionnonedeclared as 4 components, not 2
VertexColorVertexColornoneany argument is an error
CollectionParam, CollectionParameterCollectionParameterCollection, Asset, Parameter, ParameterName, OutputType, ResultTypeno Group / SortPriority / Description
any other nameresolved by reflectionrequires OutputType or ResultTypesee UE.Expression

ShaderOffsets vocabulary — lower-cased with spaces removed:

Token(s)Meaning
default, includingshaderoffsets, absoluteabsolute world position including shader offsets
excludeallshaderoffsets, excludingallshaderoffsets, nooffsetsabsolute world position, offsets excluded
camerarelativecamera-relative world position
camerarelativenooffsets, camerarelativeexcludeoffsetscamera-relative world position, offsets excluded

Origin vocabulary — lower-cased with spaces removed:

Token(s)Meaning
absolute, worldabsolute origin
camerarelativecamera-relative origin

Declared output width

The declared width comes from the first of these that resolves:

  1. an explicit OutputType or ResultType argument, from the reduced token set;
  2. the parser's own name table, below;
  3. CollectionParam / CollectionParameter, which declare a 1-component scalar;
  4. otherwise the declaration is rejected.
Name(s)Declared as
TexCoord, Pannervector, 2
Timescalar, 1
WorldPosition, CameraVectorWS, ObjectPositionWS, VertexNormalWS, VertexTangentWSvector, 3
ScreenPosition, VertexColorvector, 4

That table names ten builtins and it is not the expression-form roster, nor the same list as the recognized-names table above. VertexNormalWS and VertexTangentWS get a declared width here but have no node-creation branch, so — like SceneColor, PixelDepth, TranslatedWorldPosition and the rest of the 27 — they are only reachable as declarations through an explicit OutputType. Without one the declaration parses and then fails at generation with This builtin is not implemented by the material generator yet. …

A const qualifier is rejected on a UE.* property with Const property '{Name}' must use a plain scalar, vector, or texture type instead of a parameter node or UE builtin declaration.

Notes worth knowing

  • A UE.* call may be swizzled directly — UE.TexCoord(Index = 0).x is an ordinary postfix chain. See Expressions and conversions.
  • UE.* names are resolved before user declarations, so a property or function named TexCoord does not shadow UE.TexCoord. Nothing stops such a property from existing and being read as a bare identifier, though. See Calls.
  • A registered builtin never accepts OutputType, Class, Output, OutputName or OutputIndex. Those are read only on the generic path; on a registered builtin they are silently discarded like any other unknown name.
  • Inside a GraphFunction, UE.* calls are lifted out of the HLSL body and become generated input pins on the emitted Custom node.

Diagnostics

{Function} is the builtin name as the author spelled it, casing preserved — with one exception, Failed to create UE.{Function}., which prints the registered spelling instead.

MessageCauseFix
UE.{Function} requires parameter: {Argument}A required input was given neither by name nor positionally — most often Input on UE.TransformVector or UE.TransformPosition.Pass the value as Input = … or as the first positional argument.
UE.{Function} {Argument} must be an integer literal.A non-integer value where an integer argument is expected.
UE.{Function} {Argument} must be a numeric literal.A non-numeric value for a scalar argument.
UE.{Function} {Argument} must be a boolean literal.A value other than true / false.
UE.{Function} {Argument} must be a text value.A non-text value for a text argument.
UE.TransformVector Source/Destination is invalid.Either basis token is not in the vector vocabulary. The message never says which side failed.Check both spellings against the nine accepted vector bases.
UE.TransformPosition Source/Destination is invalid.Either basis token is not in the position vocabulary, including a token gated above the running engine version.
UE.TransformPosition FirstPersonInterpolationAlpha requires Unreal Engine 5.6 or newer.The argument was supplied on UE 5.3 – 5.5.
UE.SceneTexture expects exactly Id="..." (e.g. Id="PostProcessInput0").Not exactly one argument, or the argument is not named Id.
StaticSwitchParameter '{Name}' requires True=... and False=... inputs.A branch is missing.
StaticSwitchParameter '{Name}' branches must have the same component count, got {Left} and {Right}.The two branch widths differ. No widening is applied here.
StaticSwitchParameter '{Name}' cannot switch Texture object values.A branch is a texture object.Sample the texture first and switch the sampled value.
UE.CollectionParam collection '{Collection}' does not contain parameter '{Name}'.The name is neither a scalar nor a vector parameter of that collection.
UE.CollectionParam could not load MaterialParameterCollection '{Path}'.The asset loaded as something else, or not at all.
Failed to create UE.{Function}.The material node could not be created.
Unsupported UE builtin function '{Function}'. Use OutputType="float1/2/3/4/Texture2D/TextureCube/Texture2DArray/VolumeTexture" for generic MaterialExpression calls.A property declaration whose name is outside the parser's table, with no OutputType.Add OutputType, or move the call into the Graph block. Details
UE.{Function} for property '{Property}' does not support argument '{Argument}'.An argument outside the builtin's accepted set in the declaration form.
UE builtin property '{Property}' does not support inline defaults. Put arguments inside UE.{Function}(...).A declaration written as UE.TexCoord(…) UV = 1;

Every generation-time message from the declaration form is additionally wrapped as UE.{Function} for property '{Property}': {Message}. The complete list lives in the diagnostics index.

Example

Shader(Name="Docs/M_UEBuiltins")
{
    Properties {
        vec3 Tint = vec3(1.0, 0.6, 0.2);
        UE.TexCoord(Index = 0) UV0;
    }

    Settings {
        Domain       = "UI";
        ShadingModel = "Unlit";
    }

    Outputs {
        vec3 Color;
        Base.EmissiveColor = Color;
    }

    Graph {
        float2 uv   = UE.Panner(Coordinate = UV0, Time = UE.Time(), SpeedX = 0.1, SpeedY = 0.0);
        float3 wp   = UE.TranslatedWorldPosition();
        float3 nrm  = UE.TransformVector(UE.VertexNormalWS(), Source = "World", Destination = "Tangent");
        float  fade = UE.PerInstanceFadeAmount();
        float4 vcol = UE.VertexColor();

        Color = (vec3(uv.x, uv.y, wp.z) + nrm) * Tint * vcol.rgb * fade;
    }
}

Generated nodes:

TextureCoordinate  (Index 0)                  <- UV0        (Properties, X = -800)
Panner             (Coordinate, Time, SpeedX) <- uv         (X = 520)
Time                                          <- Panner.Time
WorldPosition      (camera-relative)          <- wp
VertexNormalWS                                -> Transform
Transform          (World -> Tangent)         <- nrm
PerInstanceFadeAmount                         <- fade
VertexColor                                   <- vcol

Where to next

On this page