How to do it...

Once the StandardColor shader is ready, we can start changing its properties:

  1. In the first line of the script, update the name to the following:
Shader "CookbookShaders/Chapter 02/StandardColor" {
Downloading the example code You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files emailed directly to you.
  1. In the Properties block of our shader, remove the current property by deleting the following code from our current shader:
_MainTex ("Albedo (RGB)", 2D) = "white" {} 
  1. As we have removed an essential property, this shader will not compile ...

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.