Legacy Shader

Compare to Legacy Shader, Surface Shader unifies the shader process and exposes fewer details to the shader writers. Therefore, starting from version 3.72, Surface Shader appears as the default ‘builtin-standard’.

However, both Legacy Shader and Surface Shader have their pros and cons.

TypeProsCons
Legacy ShaderMore flexible when facing special requirementsExposes too many details to the users, makes it difficult to maintain when the engine is upgraded
Surface ShaderUnified shading process, no need to worry about details; User-level code is easier to maintain when the engine is upgradedNeed to well-understand the whole implementation mechanism to master;Limited customizable features

In addition, the builtin-unit.effect offered by the engine still uses part of the legacy shader library.

Mastering Legacy Shader can also help you to understand more implementation details of Cocos Shaders.