Reader small image

You're reading from  Unity 5.x Shaders and Effects Cookbook

Product typeBook
Published inFeb 2016
Reading LevelIntermediate
Publisher
ISBN-139781785285240
Edition1st Edition
Languages
Tools
Concepts
Right arrow
Author (1)
Alan Zucconi
Alan Zucconi
author image
Alan Zucconi

Alan Zucconi is a passionate developer, author, and lecturer, recognized as one of Develop's 30 under 30. His expertise has been built over the past 10 years, working in the intersection between creativity and education. Starting in 2015, he published a series of educational tutorials for other developers and machine learning enthusiasts.
Read more about Alan Zucconi

Right arrow

Using CgInclude files that are built into Unity


Our first step in writing our own CgInclude files is to understand what Unity is already providing us with for shaders. By writing Surface Shaders, there is a lot happening under the hood, which makes the process of writing Surface Shaders so efficient. We can see this code in the included CgInclude files found in your Unity install folder at Editor | Data | CGIncludes. All the files contained within this folder do their part to render our objects with our shaders to the screen. Some of these files take care of shadows and lighting, some take care of helper functions, and some manage platform dependencies. Without them, our shader writing experience would be much more laborious.

You can find a list of information that Unity has provided us with at the following link: http://docs.unity3d.com/Documentation/Components/SL-BuiltinIncludes.html

Let's begin the process of understanding these built-in CgInclude files, using some of the built-in helper...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity 5.x Shaders and Effects Cookbook
Published in: Feb 2016Publisher: ISBN-13: 9781785285240

Author (1)

author image
Alan Zucconi

Alan Zucconi is a passionate developer, author, and lecturer, recognized as one of Develop's 30 under 30. His expertise has been built over the past 10 years, working in the intersection between creativity and education. Starting in 2015, he published a series of educational tutorials for other developers and machine learning enthusiasts.
Read more about Alan Zucconi