Surface Shader
Surface Shader provides an efficient and unified rendering workflow. It allows users to create shaders easily by creating surface material information with concise code, and just specifying the needed lighting and shading models.
Compared to Legacy Shader, Surface Shader has the advantages of being easier to write and maintain, better version compatibility, and reduced likelihood of rendering errors. It also provides many hight levels features through a unified process, such as unified environmental lighting and rendering debug view.
Staring from Cocos Creator v3.7.2, the default builtin-standard
is written in Surface Shader, which can be viewed in the ‘Create’ menu. The previous shader have been consolidated under the internal/effects/legacy/
folder.
List of content about Surface Shader:
- Built-in Surface Shader Guide
- Surface Shader Overview
- Surface Shader Execution Flow
- include
- Marco Remapping
- Function Replacement Using Macros
- Built-in Replaceable Functions
- Render Usages
- Lighting Models
- Surface Material Data Structure
- Shader Stages
- Shader Assembly
- VS Inputs
- FS Inputs
- Customize Surface Shader
- Rendering Debug View