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

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.

主站蜘蛛池模板: 翁牛特旗| 滦平县| 淅川县| 都江堰市| 兰考县| 子洲县| 灵石县| 丘北县| 临猗县| 辽中县| 高平市| 额尔古纳市| 安国市| 阿拉善左旗| 筠连县| 聂拉木县| 方山县| 唐海县| 宜阳县| 喀喇| 上虞市| 哈尔滨市| 宜君县| 大田县| 昌黎县| 湘阴县| 闵行区| 榆林市| 佛冈县| 保定市| 元江| 安吉县| 大悟县| 南漳县| 沁阳市| 湖北省| 监利县| 红安县| 裕民县| 东源县| 江北区|