文档

Unity Engine


User Manual

Script Reference

Unity Engine


Surface Shader language reference for the Built-In Render Pipeline

Find the directives and input structures you need to write a Surface Shader in the Built-In Render Pipeline.
阅读时间1 分钟最后更新于 4 天前

重要
The Built-In Render Pipeline is deprecated and will be made obsolete in a future release.
It remains supported, including bug fixes and maintenance, through the full Unity 6.7 LTS lifecycle.
The Universal Render Pipeline (URP) doesn't support surface shaders. For more information on how to replace surface shaders in URP, refer to Convert custom shaders for URP compatibility.
Find the directives and input structures you need to write a Surface Shader in the Built-In Render Pipeline.

Page

Description

Surface Shader required directives referenceReference for the surface shader code and lighting model directives in a Surface Shader.
Surface Shader optional directives referenceReference for transparency, functions, shadows, tessellation, and code generation directives in a Surface Shader.
Surface Shader input structure referenceReference for the input structure of a Surface Shader.