Unity3d Shader

‰ half4 LightingName (SurfaceOutput s, half3 lightDir, 
half atten){}
This function is used for forward rendering when the view direction is 
not needed.

Unity3d Shader的属性块结构如下:

其中属性类型包括:


三种自定义光照模型方法:

‰ 
half4 LightingName (SurfaceOutput s, half3 lightDir, half atten){}
//This function is used for forward rendering when the view direction is not needed.
half4 LightingName (SurfaceOutput s, half3 lightDir, half3 viewDir, half atten){}
//This function is used in forward rendering when a view direction is needed.
half4 LightingName_PrePass (SurfaceOutput s, half4 light){}
//This function is used when you are using deferred rendering for your project.


你可能感兴趣的:(unity3d,shader)