Phong 着色模型可以在固定功能管道 OpenGL 中实现吗?
Can the Phong shading model be implemented in fixed function pipeline OpenGL?
Phong shading technique interpolates normals at vertices to achieve a smooth shading effect. It is usually combined with the Phong illumination model,它可以在现代OpenGL中实现。但是,固定功能管道 OpenGL(legacy OpenGL)
包括对它的支持?
不,它不能。现代 OpenGL 使程序员能够以多种方式自定义渲染管道,这使他们能够实现此技术。但是,legacy OpenGL 不支持顶点法线插值。您可以获得的最接近的效果是 Gouraud shading,它在顶点处插入颜色。
如 OpenGL wiki 中所述:
Hardware support for lighting only extended as far as the Blinn-Phong lighting model, computed per vertex and interpolated as a final light intensity.
Phong shading technique interpolates normals at vertices to achieve a smooth shading effect. It is usually combined with the Phong illumination model,它可以在现代OpenGL中实现。但是,固定功能管道 OpenGL(legacy OpenGL) 包括对它的支持?
不,它不能。现代 OpenGL 使程序员能够以多种方式自定义渲染管道,这使他们能够实现此技术。但是,legacy OpenGL 不支持顶点法线插值。您可以获得的最接近的效果是 Gouraud shading,它在顶点处插入颜色。
如 OpenGL wiki 中所述:
Hardware support for lighting only extended as far as the Blinn-Phong lighting model, computed per vertex and interpolated as a final light intensity.