Unity Shader 1.

1. 什么是Shader

All rendering in Unity is done with Shaders - small scripts that let you configure the how the graphics hardware is set up for rendering.

Shader(着色器)意即:能够使用图形硬件(GPU)来进行渲染工作的脚本。

1.1 Surface Shader

Surface Shaders are your best option if your shader need to be affected by lights and shadows.

NOTE: Do not use Surface shaders if your shader is not doing anything with lights. 

 

1.2 Vertex and Fragment Shaders

When shader doesn‘t nedd to interact with lighting or you need some very exotic effects that the surface shaders can‘t handle, and it comes with a price: you have to write more code and it‘s harder to make it interact with lighting.

 

1.3 Fixed function Shaders

This type shaders need to be written for old hardware that doesn‘t support programmable shaders.

 2. Materials and Shaders

Shaders contain code that define what kind of properties and assets to use. Materials allow you to adjust properties and assign assets.

 

后续补充

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。