How it works...

So, let's begin the description of this shader by explaining what it does and doesn't do. First, it excludes the deferred lighting pass. This means that if you created a Lighting function that was connected to the deferred renderer's prepass, it wouldn't use that particular Lighting function and would look for the default Lighting function like the ones that we have been creating thus far in this book.

This particular shader does not support lightmapping by Unity's internal light-mapping system. This just keeps the shader from trying to find light maps for the object that the shader is attached to, making the shader more performance-friendly because it is not having to perform the lightmapping check.

We included the noforwardadd ...

Get Unity 2018 Shaders and Effects Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.