DreamShaderLang
Getting Started

First Material

Write a UI Unlit material from scratch and generate a UMaterial.

This example creates a UI-domain, Unlit material with a color parameter.

Create the File

Create this file in the project:

DShader/Materials/M_DreamPulse.dsm

Write:

Shader(Name="DreamMaterials/M_DreamPulse")
{
    Properties = {
        vec3 Tint = vec3(0.2, 0.6, 1.0);
        float Strength = 1.0;
    }

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

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

    Graph = {
        float t = UE.Time();
        float pulse = UE.Expression(
            Class="Sine",
            OutputType="float1",
            Input=t);

        Color = Tint * (pulse * 0.5 + 0.5) * Strength;
    }
}

After saving, DreamShader generates or updates:

/Game/DreamMaterials/M_DreamPulse.M_DreamPulse

What This File Does

AreaRole
Shader(Name="...")Declares the Unreal material asset to generate. Optional Root defaults to Game.
PropertiesGenerates material parameter nodes such as Tint and Strength.
SettingsSets Unreal material properties.
OutputsDeclares graph output variables and binds them to Base.EmissiveColor.
GraphCreates material nodes and assigns the final result to Color.

Parameter Panel Syntax

For a first material, float and vec3 are enough. When you need parameter groups, ordering, or descriptions in Unreal, use explicit parameter nodes:

Properties = {
    VectorParameter Tint = float4(0.2, 0.6, 1.0, 1.0) [
        Group="Color";
        SortPriority=10;
        Description="Main tint";
    ];
    ScalarParameter Strength = 1.0 [
        Group="Color";
        SortPriority=20;
    ];
}

This generates Vector / Scalar Parameter nodes and writes metadata onto the Unreal nodes.

Troubleshooting

SymptomCheck
No asset is generatedThe file is under SourceDirectory and contains Shader or ShaderFunction.
Output is emptyOutputs contains a Base.* = ... binding.
UE.Expression reports an errorClass is an Unreal MaterialExpression class name and OutputType is set.
Material compilation failsCheck the Unreal Output Log or VSCode bridge diagnostics.

On this page