The way shaders allow you to communicate the rendering properties of your material to their lighting model is via their SurfaceOutput. It is basically a wrapper around all the parameters that the current lighting model needs. It should not surprise you that different lighting models have different SurfaceOutput structs. The following table shows the three main output structs used in Unity and how they can be used:
Type of shaders |
Standard |
Physically-Based Lighting Models |
Diffuse |
Any Surface Shader SurfaceOutput |
Standard SurfaceOutputStandard |
Specular |
Any Surface Shader SurfaceOutput |
Standard (Specular setup) SurfaceOutputStandardSpecular |
The SurfaceOutput struct has the following properties: ...