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

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.

主站蜘蛛池模板: 双鸭山市| 扶绥县| 吴忠市| 华容县| 于都县| 中牟县| 辽阳县| 科尔| 定安县| 惠东县| 隆化县| 和平区| 宾阳县| 阿瓦提县| 云安县| 新和县| 封丘县| 昌吉市| 巴彦县| 易门县| 沂南县| 玛曲县| 兴国县| 小金县| 漠河县| 禹州市| 天气| 海宁市| 丹棱县| 泸水县| 阳春市| 石景山区| 淮安市| 兰溪市| 海阳市| 邵东县| 正安县| 澄城县| 唐海县| 酒泉市| 丹巴县|