shader divided into two types:
a vertex shader: calculating vertex shader is the apex of each triangular face, and render the pixel prepare
a fragment shader: in units of fragments, calculate lighting, color of a series of algorithms
1.Standard Surface Shader: standard surface shader, physics-based coloring system to simulate the real simulate the relationship between the light material.
Basic vertex shader 2.unlit Shader fragment shader, the influence from light
The relationship between shader and texture
- A shader can be associated with numerous materials
- A material the same time can only be associated with a shader
- Material can be given to the model, but not shader
- Material can be said that the shader instance, will change when changing the material shader
shader can be divided into several parts
- Shader "name" // this shader is the location name Custom shader storage
- Parameter Properties // properties, shader panel
- SubShaders // in this language stored inside cg
- FallBack // spare tire, when the shader is running will not run, "there's a shader name"
- CustomEditor // custom interface