A material language for Unreal Engine

DreamShaderLang

Describe materials in .dsm / .dsf / .dsh source files. The DreamShader plugin parses them inside the editor and builds standard UMaterial, UMaterialFunction and Material Layer assets. The source is the authoring surface; the asset is build output, and can always be thrown away and regenerated.

  • DreamShader1.5.0
  • VSCode1.5.3
  • UE5.3 – 5.8
  • LicenseMIT
M_Minimal.dsmDreamShaderLang
Shader(Name="DreamMaterials/M_Minimal"){    Properties = {        vec3 Tint = vec3(1.0, 0.2, 0.2);    }    Settings = {        Domain = "UI";        ShadingModel = "Unlit";    }    Outputs = {        vec3 Color;        Base.EmissiveColor = Color;    }    Graph = {        Color = Tint;    }}

builds /Game/DreamMaterials/M_Minimal

Workflow

From source file to material asset

Asset declarations describe the Unreal output, Graph describes the node connections, and Function / GraphFunction hold reusable Custom-node logic. Saving compiles, and generation is idempotent.

  1. Source

    .dsm / .dsf / .dsh files describe materials, function assets, shared helpers and package dependencies. import inlines the whole closure into one text before parsing.

  2. Compile

    The plugin parses declarations and Graph code, builds MaterialExpression nodes, Custom nodes and function assets, and maps diagnostics back to the line you actually wrote.

  3. Asset

    The generator writes UMaterial, UMaterialFunction, Material Layer and Layer Blend assets. Under the default backend the material lives in memory only.