DreamShaderLang
Compiler Behavior

Diagnostics and Troubleshooting

Common DreamShaderLang errors, their sources, and how to fix them.

Diagnostics can come from the parser, semantic checker, generator, Unreal material compiler, or the editor bridge.

Diagnostic Sources

SourceExamples
ParserMissing braces, invalid section syntax, malformed imports.
Semantic checkerUnknown symbol, duplicate output, type mismatch.
GeneratorUnsupported UE.* call, invalid asset path, layout reference error.
Unreal compilerMaterial compile errors after asset generation.
Editor bridgeReflected metadata or asset-generation diagnostics shown in VSCode/Rider.

Source Map

DreamShader tries to report diagnostics against the source file and range that produced the problem. For generated Custom-node code, the location may point to the helper or Graph statement that emitted the code.

Common Parse Errors

ErrorFix
Missing }Check section and declaration braces.
Missing ;End statements and section entries with semicolons where required.
Invalid importUse quoted paths and check package spelling.

Common Graph Errors

ErrorFix
Unknown variableDeclare the value or check imports.
Type mismatchMatch scalar/vector dimensions or add constructors.
Unsupported expressionMove complex logic into Function or GraphFunction.

Function Call Errors

ErrorFix
Helper not foundCheck namespace and import path.
Wrong argument countUse signature help or inspect the declaration.
Multi-output helper used as valueUse explicit out variables.

UE Builtin Errors

ErrorFix
Unknown UE.* callUse UE.Expression(...) or update reflected metadata.
Missing OutputTypeAdd OutputType to generic expressions.
Invalid node propertyCheck Unreal class metadata and plugin diagnostics.

Layout Errors

ErrorFix
Unknown node in Node(...)Check the generated variable or node name.
Bad comment sizeProvide valid W and H.
Region not closedAdd matching #EndRegion.

Material Layer Errors

Check that ShaderLayer / ShaderLayerBlend uses MaterialAttributes inputs and outputs that match Unreal's expectations for layer assets.

Material Output Errors

ErrorFix
No visible outputBind a value to Base.*.
Wrong output typeMatch the expected float, vec3, or MaterialAttributes type.
Reserved return misuseUse return only as a binding, not a normal variable.

Troubleshooting Order

  1. Fix parser errors first.
  2. Fix missing imports and unknown symbols.
  3. Fix type and signature mismatches.
  4. Check generated Unreal material compile errors.
  5. Re-export bridge metadata if editor completion looks stale.

On this page