Getting ready

Let's walk through the process of generating a new item for this recipe:

  1. From the Project tab, right-click on the Assets folder and select Show in Explorer. You should see your project folder. Then create a text file by right-clicking and selecting New | Text Document:
  1. Rename the file to MyCGInclude and replace the .txt file extension with .cginc:
  1. Windows will give you a warning message saying that the File may become unusable, but it will still work.
  2. Import this new .cginc file into your Unity project and let it 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.