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

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.

主站蜘蛛池模板: 漳州市| 新丰县| 东明县| 怀化市| 焉耆| 隆尧县| 集贤县| 雷山县| 达拉特旗| 澄江县| 故城县| 松溪县| 石棉县| 察雅县| 玉山县| 江永县| 大竹县| 夹江县| 富平县| 房产| 松江区| 罗山县| 慈利县| 荣昌县| 平罗县| 广宁县| 察隅县| 大同市| 广汉市| 东兰县| 广水市| 海安县| 和龙市| 惠州市| 射阳县| 甘孜| 大姚县| 会昌县| 漾濞| 泸定县| 左云县|