In simple scenarios where lighting calculations are unnecessary, the engine provides UnlitMaterial, which uses minimal shader code. It only requires a color or texture to render. Unlit materials are ideal for rendering pre-baked models, as they need only a base texture or color to display high-quality offline rendering results. The downside is that they cannot display real-time light interaction effects, as Unlit rendering is entirely determined by textures and is unaffected by lighting.
Parameter | Description |
---|---|
baseColor | Base Color. Base Color * Base Texture = Final Color. |
baseTexture | Base Texture. Multiplied with base color. |
tilingOffset | Tiling Offset. A Vector4 value controlling UV scaling and offset (see example). |
For script-based material usage, refer to the material usage tutorial.
As described in the baking tutorial, if you've already prepared baked textures and want a convenient material whose color is solely determined by the baked texture—without needing to add lights, adjust normals, or tweak advanced properties like metallic/roughness—you can use Galacean's UnlitMaterial. glTF includes a dedicated KHR_materials_unlit extension, which Galacean parses to generate Unlit materials.
Test model: TREX.zip
Import Model
Modify Shader
The default shader type is BSDF. Change the surface shader type in the material properties to Background.
Add Baked Texture
Connect the baked texture's Color output to the Shader input.
Export glTF
If the preview looks correct, export the glTF file.
Drag the exported glTF file into the editor or glTF Viewer. If the material type is UnlitMaterial, it means the KHR_materials_unlit extension has been correctly applied, and Galacean has parsed it into an Unlit material.