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

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.

主站蜘蛛池模板: 宝兴县| 卢湾区| 广昌县| 湖口县| 中西区| 丁青县| 长寿区| 万荣县| 邻水| 缙云县| 福贡县| 苍南县| 罗山县| 土默特左旗| 浙江省| 太康县| 莱西市| 孙吴县| 昌邑市| 昭通市| 龙州县| 宜兰县| 高雄县| 吴旗县| 密山市| 岳西县| 济阳县| 昆山市| 黄石市| 丹阳市| 五寨县| 博乐市| 商城县| 邵阳县| 邵武市| 武乡县| 榆树市| 高雄市| 商城县| 和顺县| 阳山县|