Version: 2017.2
遮挡剔除
纹理

材质、着色器和纹理

Rendering in Unity is done with Materials, Shaders and Textures.

There is a close relationship between Materials, Shaders and Textures in Unity.

Materials are definitions of how a surface should be rendered, including references to textures used, tiling information, colour tints and more. The available options for a material depend on which shader the material is using.

Shaders are small scripts that contain the mathematical calculations and algorithms for calculating the colour of each pixel rendered, based on the lighting input and the Material configuration.

Textures are bitmap images. A Material may contain references to textures, so that the Material’s shader can use the textures while calculating the surface colour of an object. In addition to basic colour (albedo) of an obejct’s surface, textures can represent many other aspects of a material’s surface such as its reflectivity or roughness.

材质指定了要使用的一种特定着色器,而使用的着色器确定材质中可用的选项。着色器指定期望使用的一个或多个纹理变量,而 Unity 中的材质检视面板 (Material Inspector) 允许您将自己的纹理资源分配给这些纹理变量。

For most normal rendering - by which we mean characters, scenery, environments, solid and transparent objects, hard and soft surfaces etc., the Standard Shader is usually the best choice. This is a highly customisable shader which is capable of rendering many types of surface in a highly realistic way.

There are other situations where a different built-in shader, or even a custom written shader might be appropriate - such as liquids, foliage, refractive glass, particle effects, cartoony, illustrative or other artistic effects, or other special effects like night vision, heat vision or x-ray vision, etc.

The following pages describe:

遮挡剔除
纹理