Using Built-in Shaders

The Galacean engine provides several commonly used built-in shaders, including:

TypeDescription
UnlitThe Unlit Shader is suitable for rendering pre-baked models. It only requires a base texture or color to display high-quality offline rendering results. However, it cannot simulate real-time light interaction because its rendering is entirely determined by textures and is unaffected by lighting. See the baking tutorial and Unlit export tutorial for details.
Blinn PhongThe Blinn Phong Shader is ideal for scenarios where photorealism is not critical. Though not physically based, its efficient rendering algorithm and comprehensive optical properties make it applicable in many cases.
PBRThe PBR Shader is designed for applications requiring realistic rendering. Since PBR follows energy conservation and is physically based, developers can ensure physically accurate results by adjusting parameters like metallic, roughness, and lighting.
HairThe hair shader is based on the Kajiya-Kay model, approximating dual-layer anisotropic highlights on hair strands, commonly referred to as "angel rings" in hair rendering.
SkinSkin rendering uses the Spherical Gaussian model, allowing flexible customization of different diffusion profiles to simulate human skin or standard subsurface scattering effects.
EyesThe eye shader provides realistic rendering for eyeball models, enabling lifelike artistic results in your creations.

You can directly debug the corresponding properties of built-in shaders in the editor to observe real-time rendering changes.

Most built-in shaders share these common parameters:

ParameterDescription
isTransparentTransparency. Enables/disables transparency. When enabled, use BlendMode to set the color blending mode.
alphaCutoffAlpha Cutoff Value. Sets a threshold; fragments with alpha values below this will be discarded in the shader. See example.
renderFaceRender Face. Controls whether to render front-facing, back-facing, or both sides.
blendModeColor Blending Mode. Specifies how colors blend when the material is transparent. See example.
tilingOffsetTiling Offset. A Vector4 value controlling UV scaling and offset. See example.

Each shader offers unique rendering effects and use cases. For more details, refer to the Built-in Shaders tutorial.

Was this page helpful?