官术网_书友最值得收藏!

There's more...

The source code of the built-in shaders is typically hidden in Unity. You cannot open this from the editor as you do with your own shaders. For more information on where to find a large portion of the built-in Cg functions for Unity, go to your Unity install directory and navigate to the Editor | Data | CGIncludes folder:

In this folder, you can find the source code of the shaders shipped with Unity. Over time, they have changed a lot; you can visit the Unity download archive (https://unity3d.com/get-unity/download/archive) if you need to access the source codes of a shader used in a different version of Unity. After choosing the right version, select Built in shaders from the drop-down list, as shown in the following screenshot:

There are three files that are of note at this point: UnityCG.cginc,  Lighting.cginc, and UnityShaderVariables.cginc. Our current shader is making use of all these files at the moment. In Chapter 11, Advanced Shading Techniques, we will explore in depth how to use CGInclude for a modular approach to shader coding.

主站蜘蛛池模板: 平顺县| 澄城县| 五大连池市| 麦盖提县| 岱山县| 新干县| 珲春市| 普定县| 安陆市| 菏泽市| 抚顺县| 萨嘎县| 河源市| 任丘市| 临城县| 云梦县| 宜宾县| 济源市| 深水埗区| 长丰县| 砚山县| 五河县| 山东省| 措勤县| 离岛区| 冀州市| 阳谷县| 汉中市| 西吉县| 彩票| 黄浦区| 德化县| 措勤县| 长寿区| 海晏县| 景泰县| 游戏| 阿勒泰市| 金秀| 嘉义市| 溆浦县|