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

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.

主站蜘蛛池模板: 徐州市| 西乌珠穆沁旗| 乌兰浩特市| 马山县| 德清县| 通江县| 海城市| 沅陵县| 剑川县| 宣武区| 湘潭市| 疏附县| 苏尼特右旗| 卓资县| 永泰县| 三门县| 石狮市| 古交市| 阿克苏市| 西城区| 宾川县| 丰都县| 丰城市| 库伦旗| 尖扎县| 怀集县| 孟州市| 元朗区| 和龙市| 德清县| 延长县| 阳新县| 杨浦区| 板桥市| 江城| 洱源县| 南昌市| 静乐县| 永川市| 永和县| 昆山市|