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

Getting ready

Let's see how this works in our current shader called StandardDiffuse by creating our own properties and learning more about the syntax involved. For this example, we will refit the shader previously created. Instead of using a texture, it will only use its color and some other properties that we will be able to change directly from the Inspector tab. Start by duplicating the StandardDiffuse shader. You can do this by selecting it in the Inspector tab and pressing Ctrl D. This will create a copy called StandardDiffuse 1. Go ahead and rename it as StandardColor.

You can give a friendlier name to your shader in its first line. For instance, Shader "CookbookShaders/StandardDiffuse" tells Unity to call this shader StandardDiffuse and move it to a group called CookbookShaders. If you duplicate a shader using Ctrl D, your new file will share the same name. To avoid confusion, make sure to change the first line of each new shader so that it uses a unique alias in this and future recipes.

主站蜘蛛池模板: 治多县| 闵行区| 纳雍县| 乃东县| 若尔盖县| 个旧市| 焦作市| 长垣县| 开原市| 克东县| 五台县| 汾阳市| 册亨县| 呼伦贝尔市| 荃湾区| 闽清县| 西充县| 赤城县| 札达县| 北安市| 岫岩| 全州县| 全椒县| 江北区| 如皋市| 镇赉县| 牟定县| 杭锦后旗| 商水县| 犍为县| 徐州市| 喜德县| 宝清县| 镇江市| 巴彦县| 奉新县| 北流市| 玛沁县| 贡嘎县| 盐津县| 中方县|