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

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.

主站蜘蛛池模板: 龙江县| 新余市| 恩平市| 贵港市| 营山县| 冷水江市| 诸城市| 河北省| 禄丰县| 临湘市| 永吉县| 阿克| 浙江省| 南涧| 荥阳市| 锦州市| 固原市| 万山特区| 丰顺县| 平潭县| 洛扎县| 牡丹江市| 新泰市| 诏安县| 荆州市| 叙永县| 阿合奇县| 南昌市| 资兴市| 东乡族自治县| 潼南县| 防城港市| 绥化市| 海伦市| 区。| 尼木县| 常德市| 上栗县| 山阴县| 华坪县| 盘锦市|