1, overview
2, Understanding Shader
Definition:code that define what's the material can do in the environment
Classification:
Surface shader--Easy to write, influenced by lighting and other factors
Vertex and Fragment Shader (Pixels)--very flexible, large code size, good written to improve rendering efficiency and reduce overhead
Fixed Function shader--fix pipeline Shader, to older hardware (in fact, it will be converted into a programmable Shader to execute)
3, Shader Language in Unity 3D
Shaderlab: By
Cg (C for graphics): Nvidia developed, easy to learn and very powerful
GLSL (OpenGL shading Language): Shader for mobile platforms that can be automatically converted into CG shader
4, Structure of basic Shader
Shader:defines the connection between Shader and Unity3d
Properties: Define some variable attributes
Subshader: The body of the code, can be multiple subshader, and each subshader can have multiple channels pass
Digital tutors-introduction to Scripting Shaders in Unity learning notes