- Unity 2018 Shaders and Effects Cookbook
- John P. Doran Alan Zucconi
- 186字
- 2021-06-18 19:04:12
Creating a basic Standard Shader
In Unity, when we create a game object, we then attach additional functionality through the use of components. In fact, every game object is required to have a Transform component; there are a number of components included in Unity already, and we create components of our own when we write scripts that extend from MonoBehaviour.
All the objects that are part of a game contain a number of components that affect their look and behavior. While scripts determine how objects should behave, renderers decide how they should appear on the screen. Unity comes with several renderers, depending on the type of object that we are trying to visualize; every 3D model typically has a MeshRenderer component attached to it. An object should have only one renderer, but the renderer itself can contain several materials. Each material is a wrapper for a single shader, the final ring in the food chain of 3D graphics. The relationships between these components can be seen in the following diagram:
Understanding the difference between these components is essential for understanding how shaders work.
- 自己動手實現Lua:虛擬機、編譯器和標準庫
- Learning Chef
- 深入淺出Java虛擬機:JVM原理與實戰
- 微服務設計原理與架構
- 碼上行動:零基礎學會Python編程(ChatGPT版)
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第3版)
- 編程數學
- Apache Spark 2.x for Java Developers
- Building Android UIs with Custom Views
- Internet of Things with ESP8266
- 深入分析GCC
- Java多線程并發體系實戰(微課視頻版)
- 大話代碼架構:項目實戰版
- 走近SDN/NFV
- 中小企業網站建設與管理(靜態篇)