Opengl_14_环境光

时间:2017-02-16 23:09:16   收藏:0   阅读:202

1,
光源颜色 * 物体表面颜色 => 得到反射回来的颜色
再乘以环境光的强度因素从而得到最终的颜色值。

技术分享

技术分享

2,
获取键盘事件修改环境强度因素值。
技术分享

每次渲染的时候传入
光源颜色值和环境强度因素值。
glUniform3f(dirlight_colorlocation, directionallight.Color.x, directionallight.Color.y, directionallight.Color.z);

glUniform1f(dirlight_ambientintensitylocation, directionallight.AmbientIntensity);


3,

v++
技术分享


b++
技术分享

原文:http://www.cnblogs.com/liuhan333/p/6407250.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!