DreamShaderLang
DreamShader Plugin

Plugin Overview

The purpose and capabilities of the DreamShader plugin, and how it relates to DreamShaderLang.

DreamShader is the Unreal plugin that compiles DreamShaderLang source files into Unreal material assets. DreamShaderLang is the source language; the plugin handles parsing, generation, diagnostics, cache tracking, decompilation, and editor integration.

Current plugin version: 1.4.0. It is actively developed against Unreal Engine 5.7 and has been verified with single-plugin RunUAT BuildPlugin builds on Unreal Engine 5.3, 5.4, 5.5, 5.6, and 5.7.

Problem It Solves

Unreal material graphs become hard to review, diff, reuse, and migrate as they grow. DreamShader moves the repeatable parts into text:

Pain pointDreamShader answer
Large graphs are hard to reviewStore graph structure in .dsm / .dsf files.
Shared logic is duplicatedPut helpers in .dsh, .dsf, Function, GraphFunction, or packages.
Material functions are easy to break on regenerationPreserve stable inputs and outputs for ShaderFunction assets.
UE 5.7 Substrate graphs need text authoringUse the Substrate type, Base.FrontMaterial, and Substrate.* wrappers.
Existing graphs need migrationExport Material and Material Function assets as .dsm / .dsf starting points.
Material iteration needs faster feedbackRequest a .dsm material preview from VSCode through the Unreal bridge.

Core Capabilities

CapabilityDescription
Source scanningWatches the configured DShader source directory.
Asset generationGenerates UMaterial, UMaterialFunction, Material Layer, and Layer Blend assets.
Graph generationConverts Graph DSL statements into Unreal MaterialExpression nodes.
Substrate generationSupports Substrate graph values, Base.FrontMaterial, and current UE 5.7 Substrate wrappers.
DiagnosticsReports parse, semantic, generation, and bridge diagnostics back to the editor.
MaterialExpression metadataExports reflected node metadata for editor completion and hover.
Material preview bridgeWrites preview results under Saved/DreamShader/Bridge and can stream local WebSocket preview frames to VSCode.
Decompile exportCreates initial .dsm / .dsf sources from existing Unreal assets.
Package workflowResolves package imports from DShader/Packages.

Language vs Plugin

PartResponsibility
DreamShaderLangSyntax, declarations, Graph expressions, helper functions, imports, and package references.
DreamShader pluginFinds files, parses sources, resolves imports, creates Unreal assets, writes metadata, reports diagnostics, and serves preview results.
Editor extensionsProvide syntax highlighting, completion, hover, navigation, diagnostics, material preview, package commands, and templates.

Outputs

DeclarationUnreal asset
ShaderUMaterial
ShaderFunctionUMaterialFunction
ShaderLayerUMaterialFunctionMaterialLayer
ShaderLayerBlendUMaterialFunctionMaterialLayerBlend
VirtualFunctionNo generated asset; references an existing material function.
.dshNo direct asset; contributes imports and shared helpers.

Best Fit

DreamShaderLang works best for:

ScenarioWhy it fits
Parameterized UI / Unlit materialsThese graphs are often formulaic and easy to describe as text.
Shared material helper libraries.dsh, .dsf, and package imports make reuse explicit.
Team-reviewed material changesText diffs are easier to review than graph screenshots.
Generated or migrated materialsDecompile export and source regeneration reduce manual graph work.

Very visual one-off graphs can still be authored directly in Unreal, then exported later if they become stable or need to be reused.

On this page