首页 > 编程语言 > 详细

Unity3d Shader

时间:2015-10-18 08:48:06      阅读:284      评论:0      收藏:0      [点我收藏+]

? 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

原文:http://www.cnblogs.com/mengfanrong/p/4888878.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!