DreamShaderLang
Language Core

Types and Values

Scalars, vectors, textures, Path values, and literal rules in DreamShaderLang.

DreamShaderLang uses shader-style scalar and vector types, plus Unreal-facing texture and parameter node types.

Scalar Types

TypeMeaning
floatFloating-point scalar.
intInteger scalar.
boolBoolean value.

Vector Types

TypeComponents
vec2 / float22-component vector.
vec3 / float33-component vector.
vec4 / float44-component vector.

GLSL-style Aliases

DreamShaderLang accepts common GLSL-style names such as vec2, vec3, and vec4. HLSL-style aliases such as float2, float3, and float4 are also commonly used.

Texture Types

TypeNotes
Texture2D2D texture.
TextureCubeCube texture.
Texture3D / VolumeTextureVolume texture support used by plugin and editor completion.

MaterialAttributes

MaterialAttributes represents Unreal material attribute structs, useful for Material Layer and Layer Blend workflows.

Inputs = {
    MaterialAttributes BaseMaterial;
}

Parameter Node Types

Use explicit parameter node types when you need Unreal parameter metadata:

TypeTypical value
ScalarParameter1.0
VectorParameterfloat4(1, 1, 1, 1)
TextureObjectParameterPath("/Game/...") or default texture reference
StaticSwitchParametertrue / false

Literals

Scalars

float Roughness = 0.5;
int Count = 4;
bool Enabled = true;

Vector Construction

vec3 Color = vec3(1.0, 0.2, 0.1);
float4 Packed = float4(Color, 1.0);

Brace Initializer

Brace initializers are used in sections and metadata lists:

Properties = {
    float Strength = 1.0;
}

Strings

Strings are used for Unreal setting values, class names, package paths, and metadata:

Settings = {
    Domain = "UI";
}

Path(...)

Path(...) is used for Unreal asset references:

TextureObjectParameter Noise = Path("/Game/Textures/T_Noise.T_Noise");

Removed Aliases

Avoid relying on old aliases that have been removed or deprecated. Prefer the explicit types documented here, especially for texture and parameter node declarations.

On this page