Opengl_14_环境光
1,
光源颜色 * 物体表面颜色 => 得到反射回来的颜色
再乘以环境光的强度因素从而得到最终的颜色值。
2,
获取键盘事件修改环境强度因素值。
每次渲染的时候传入光源颜色值和环境强度因素值。
glUniform3f(dirlight_colorlocation, directionallight.Color.x, directionallight.Color.y, directionallight.Color.z);
glUniform1f(dirlight_ambientintensitylocation, directionallight.AmbientIntensity);
3,
v++
b++