In the previous two chapters, we explained the basic theory of lighting for rendering and implemented a diffuse and a specular shader from scratch, within an Unlit shader. In this chapter, weâre going to translate the Unlit shader from last chapter into a Surface shader, which will save a fair bit of code.
What Is a Surface Shader?
A Surface shader is a type of
shader unique to Unity, which is meant to be used for shaders that calculate surface lighting models. From this chapter on, weâre only going to use Surface shaders for lighting. ...