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

9. Making a Shader Physically Based

Claudia Doppioslash1 
(1)
Liverpool, Merseyside, UK
 
Among the many things you learned in the last chapter, there are the three rules your implemented BRDFs need to follow In order to be considered physically based. One way to put this knowledge into practice is to review the custom Phong surface shader, to find whether it breaks those rules. The shader followed the original formulation of Phong, which is fairly old, so it’s quite likely.

Analyzing Phong

Listing 9-1 shows the custom Phong lighting functions . Let’s check for positivity, reciprocity, and energy conservation. ...

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.