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

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.

主站蜘蛛池模板: 玉屏| 阳原县| 达尔| 专栏| 多伦县| 舟曲县| 夹江县| 寿光市| 孝感市| 锦州市| 广元市| 余庆县| 涞源县| 长丰县| 临清市| 潮安县| 钟山县| 台中市| 双城市| 瑞安市| 修武县| 炉霍县| 上栗县| 黑河市| 志丹县| 扎赉特旗| 长治市| 茂名市| 田林县| 文水县| 朝阳区| 连云港市| 仙桃市| 保靖县| 金阳县| 威海市| 遂昌县| 乌苏市| 英吉沙县| 郴州市| 松桃|