Shader assets define Shader objects in the Galacean editor project and currently include two types:
With the .gs
suffix, it is the entry file compiled by ShaderLab.
With the .glsl
suffix, it is a reusable ShaderLab code snippet introduced via the #include
macro.
EditorProperties
and EditorMacros
can only be declared in the Shader main file and cannot be introduced via the #include
macro.
The editor provides three Shader asset file templates: Unlit Shader
, PBR Shader
, and Shader Chunk
. Similar to script components, selecting a Shader asset allows you to preview the Shader code in the Inspector interface. You can edit the Shader code in real-time by double-clicking or selecting it in the code editing page.
Go to Shader API Tutorial to learn how to extend Shaders based on the templates.