Unity3d Shader

来源:互联网 发布:手机网络信号不稳定 编辑:程序博客网 时间:2024/05/02 05:22

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

Unity3d Shader的属性块结构如下:

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.


0 0
原创粉丝点击