标签:考试 org mat blog 程序 size 规范 切换 实践
我的个人网站:www.bladesero.win
配置环境:win 10+blender 2.77a
博主最近学了一些shader编程,现在想到blender里面简单实践一下
1 shader test(float Kd=1, 2 float Exponent = 10.0, 3 color Col=1, 4 color Color1 = color(0.8, 0.0, 0.0), 5 color Color2 = color(0.0, 0.8, 0.0), 6 color Color3 = color(0.0, 0.0, 0.8), 7 color Color4 = 0.1, 8 color Color5 = 0.2, 9 color Color6 = 0.3, 10 color Color7 = 0.4, 11 color Color8 = 0.5, 12 normal Normal=N, 13 output closure color Phong = 0,//冯氏光照模型 14 output closure color Diffuse=0//漫反射光照模型) 15 { 16 color Color[8] = {Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8}; 17 Diffuse = Kd*Col*diffuse(Normal); 18 Phong=phong_ramp(Normal,Exponent,Color); 19 }
标签:考试 org mat blog 程序 size 规范 切换 实践
原文地址:http://www.cnblogs.com/nightdreammoon/p/6853120.html