© Claudia Doppioslash 2018
Claudia DoppioslashPhysically Based Shader Development for Unity 2017https://doi.org/10.1007/978-1-4842-3309-2_7

7. Surface Shaders

Claudia Doppioslash1 
(1)
Liverpool, Merseyside, UK
 
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. ...

Get Physically Based Shader Development for Unity 2017: Develop Custom Lighting Systems now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.