DreamShaderLang
HLSL / GLSL Background

Keyword Cheatsheet

Common DreamShaderLang, HLSL, and GLSL keywords side by side.

Use this page as a quick vocabulary reference when moving between DreamShaderLang, HLSL, and GLSL examples.

DreamShaderLang

Keyword / blockMeaning
importImport a project or package source file.
ShaderGenerate UMaterial.
ShaderFunctionGenerate UMaterialFunction.
ShaderLayerGenerate Material Layer function asset.
ShaderLayerBlendGenerate Material Layer Blend function asset.
VirtualFunctionReference an existing Unreal material function.
FunctionHLSL-style helper.
GraphFunctionHelper that may contain UE.* calls.
NamespaceGroup helpers.
PropertiesMaterial parameter declarations.
InputsFunction or layer inputs.
OutputsOutput variables and bindings.
SettingsUnreal material settings.
GraphMaterial graph DSL.
LayoutNode position and comment metadata.

DreamShaderLang Common Types

TypeMeaning
float, int, boolScalar types.
vec2, vec3, vec4GLSL-style vector aliases.
float2, float3, float4HLSL-style vector aliases.
Texture2D, TextureCube, Texture3D, VolumeTextureTexture types.
MaterialAttributesUnreal material attributes value.

HLSL Common Keywords

KeywordMeaning
returnReturn value.
if, elseConditional flow.
for, whileLoops in helper code.
out, inoutOutput and input/output parameters.
structStructured type in HLSL.

GLSL Common Keywords

KeywordMeaning
returnReturn value.
if, elseConditional flow.
for, whileLoops.
in, out, inoutShader or function data direction.
uniformExternal shader parameter in GLSL.

Migration Reminders

Source habitDreamShaderLang equivalent
Raw GLSL shader filePut reusable math in Function; build Unreal nodes in Graph.
HLSL Custom node bodyUse Function or GraphFunction.
Visual material nodeUse a specific UE.* helper or UE.Expression(...).
Shared include fileUse .dsh and package imports.

On this page