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

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.

主站蜘蛛池模板: 夏河县| 揭阳市| 山丹县| 玛曲县| 黑河市| 英吉沙县| 惠州市| 桓台县| 武山县| 惠安县| 若尔盖县| 江陵县| 神农架林区| 福建省| 越西县| 大名县| 德清县| 四会市| 临城县| 沙雅县| 轮台县| 达日县| 邢台县| 龙胜| 读书| 五河县| 武陟县| 郸城县| 鲁甸县| 金川县| 合川市| 宜黄县| 桃园市| 湘潭县| 宣城市| 修文县| 定州市| 新龙县| 大名县| 耒阳市| 高雄县|