Offset factor unit (offset = m * factor + r * units)
m: slope polygon maximum depth (z changes / x and y change the smallest variation).
r: it is a constant (specifically dependent on the particular implementation).
Blend :
Blend Off:Do not mix.
Blend src dst:(Source color * src) + (target color * dst), a value of zero, one, SrcColor, SrcAlpha, DstColor, DstAlpha, OneMinusSrcColor, OneMinusSrcAlpha, OneMinusDstColor, OneMinusSrcAlpha.
BlendOp colorOp:colorOp为Add、Min、Max、Sub。
BlendOp colorOp, alphaOp
AlphaToMask On | Off
ColorMask RGB | A | 0 | any combination of R, G, B, A of the
SubShader Tags:SubShader in the Tags (Tags not Pass in).
Queue: rendering order, the value Background, Geometry, AlphaTest, Transparent, Overlay, specific figures.
RenderType: render type, is Opaque, Transparent, custom string, for rendering frequently replaced.
DisableBatching: whether to disable batch. True, False, LODFading,
ForceNoShadowCasting:
IgnoreProjector: Ignore the projected value of True, False.
CanUseSpriteAtlas:
PreviewType: How to display the Material Editor, the value of Sphere, Plane, Skybox.
Pass Tags:Pass in the Tags.
LightMode: light mode.
Always:
ForwardBase: prior to rendering, for ambient light, the main parallel light, spherical harmonic light, light texture.
ForwardAdd: Forward rendering, additional lighting each pixel is performed once.
Deferred: deferred rendering, render to GBuffer in.
ShadowCaster: rendering objects to the depth or depth shadow map.
MotionVectors: used to calculate the motion vector of each object.
PrepassBase: for the old deferred rendering, render the normal and specular exponent.
PrepassFinal: Old delay for rendering, rendering the final color, and the light emission.
Vertex: vertex lighting, if the object is not lightmaps light vertex being enabled.
VertexLMRGBM (deprecated): vertex lighting can be obtained unity_Lightmap process Lightmaps (for PC).
VertexLM: vertex lighting can be obtained unity_Lightmap process Lightmaps (for mobile devices).
PassFlags:
RequireOptions:
FallBack "Diffuse":If you do not find a suitable SubShader, to use "Diffuse" default Shader realized.
Shader语言:
GLSL:Between GLSLPROGRAM and ENDGLSL write GLSL code.
CG:CGPROGRAM between CG and ENDCG write code.
ShaderLab
ShaderLab:If you want to write a support lighting, shadows and other features of Shader, you can write directly Surface Shader, it has been for us a good package of all complexity.