首页 > 解决方案 > OpenGL: Problem With Phong Model Specular Lighting

问题描述

I know that specular lighting is also based on the view direction. But I can't find what the default view direction is in old OpenGL function glLight(.. GL_SPECULAR..). How does it determine the direction of the view?

标签: c++opengllightphong

解决方案


在旧的 OpenGL 中,光照是在视图空间中完成的,其中相机坐标为 (0, 0, 0),因此视图方向向量等于片段的位置。


推荐阅读