ShaderLab Syntax Standard

Editing Shaders in the Editor

Double-click the shader asset we created in the previous step to jump to the code editing page.

A future version will release the Galacean VSCode plugin, which will provide syntax checking, auto-completion, and code synchronization features for ShaderLab. Stay tuned.

Syntax Standard

The ShaderLab syntax framework is as follows:

Shader "ShaderName" {
  ...
  Editor {
    ...
  }
  SubShader "SubShaderName" {
    ...
    Pass "PassName" {
      ...
    }
    ...
  }
  ...
}

It mainly includes Shader, SubShader, and ShaderPass modules.

Was this page helpful?