- Unity 2018 Shaders and Effects Cookbook
- John P. Doran Alan Zucconi
- 172字
- 2021-06-18 19:04:14
Adding properties to a shader
Properties of a shader are very important for the shader pipeline as they are the method that you use to let the artist or user of the shader assign textures and tweak your shader values. Properties allow you to expose GUI elements in a material's Inspector tab without you having to use a separate editor, which provides visual ways to tweak a shader. With your shader opened in your IDE of choice, look at the block of lines two through seven. This is called the Properties block of the script. Currently, it will have one texture property in it called _MainTex.
If you look at your material that has this shader applied to it, you will notice that there is one texture GUI element in the Inspector tab. These lines of code in our shader are creating this GUI element for us. Again, Unity has made this process very efficient in terms of coding and the amount of time it takes to iterate through changing your properties.
- C語言程序設計案例教程
- Python自動化運維快速入門(第2版)
- 數據結構習題精解(C語言實現+微課視頻)
- Mastering Scientific Computing with R
- Hands-On Microservices with Kotlin
- Scala編程實戰(原書第2版)
- Angular開發入門與實戰
- OpenGL Data Visualization Cookbook
- LabVIEW虛擬儀器程序設計從入門到精通(第二版)
- Qlik Sense? Cookbook
- jQuery for Designers Beginner's Guide Second Edition
- Java高并發編程詳解:深入理解并發核心庫
- Solr權威指南(下卷)
- Android 游戲開發大全(第二版)
- Software Architecture with Python