c++ - 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?
解决方案
在旧的 OpenGL 中,光照是在视图空间中完成的,其中相机坐标为 (0, 0, 0),因此视图方向向量等于片段的位置。
推荐阅读
- c# - 无法将 C# Basic bot 连接到 Bot Framework Emulator
- apache-spark - PySpark:更新给定行数的 DataFrame 的列值
- bash - 如何在bash中同时重复两个for循环?
- azure - 删除对 Azure Web App 的公共 Web 访问
- vba - 识别并粘贴最近更新的命名范围
- java - 如何在 Google Colab 中使用 Java
- python - 沿给定轴乘以数组
- webpack - 使用 Webpack 4 进行静态代码拆分
- converse.js - 在已使用初始化关闭后打开 conversejs 聊天窗口
- unit-testing - ABAP中类方法的依赖注入